javax.servlet.http.HttpServlet" was not found on the Java Build Path

问题解决(以maven为例):

只需在pom.xml导入对应的两个依赖即可解决该问题:

        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
        </dependency>

        
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
        </dependency>

猜你喜欢

转载自www.cnblogs.com/youcong/p/10387641.html