The package javax.servlet.http is accessible from more than one module: servlet.api, tomcat.i18n.es,

import javax.servlet; 导包失败
右键项目名 ----> Properties ----> Java Build Path ----> Libraries ----> ClassPath ---->Add Library ----> Server Runtime ----> Next ----> 选择tomcat ----> Finish
注意不要在ModulePath下选择tomcat,否则错误还在
如果ModulePath和ClassPath下都有tomcat,错误同样也在

你可能感兴趣的:(The package javax.servlet.http is accessible from more than one module: servlet.api, tomcat.i18n.es,)