javax.servlet is accessible from more than one module:

javax.servlet is accessible from more than one module:

import javax.servlet   导包失败

    Tomcat的包路径要选择Classpath,否则就不能编译,导致找不到Servlet相关的包。

javax.servlet is accessible from more than one module:_第1张图片

步骤如下:

     1.右键 ----》 Properties ----> Java Build Path ----> Libraries ----> ClassPath ---->Add Library ----> Server Runtime ----> Next ----> 选择tomcat ----> Finish

    2. Apple应用。

javax.servlet is accessible from more than one module:_第2张图片

你可能感兴趣的:(bug)