关于 javax.servlet.jsp.PageContext cannot be resolved to a type
2017-02-21 21:56
411 查看
问题:当从一个项目中拷贝jsp文件到另一个项目中出现报错:javax.servlet.jsp.PageContext cannot be resolved to a type
解决方法一:添加依赖(推荐)
<!-- 防止 jsp 报错 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.2.1-b03</version>
</dependency>
解决方法二:将项目部署到tomcat服务当中
这种问题的解决办法是把这个项目在服务器上部署一下就可以了,如下:
解决方法一:添加依赖(推荐)
<!-- 防止 jsp 报错 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.2.1-b03</version>
</dependency>
解决方法二:将项目部署到tomcat服务当中
这种问题的解决办法是把这个项目在服务器上部署一下就可以了,如下:
相关文章推荐
- javax.servlet.jsp.PageContext cannot be resolved to a type
- Eclipse javax.servlet.jsp.PageContext cannot be resolved to a type 错误玄学解决办法
- Eclipse jsp页面javax.servlet.jsp.PageContext cannot be resolved to a type 错误解决办法
- javax.servlet.jsp.PageContext cannot be resolved to a type
- jsp页面报javax.servlet.jsp.PageContext cannot be resolved to a type:
- [记录]javax.servlet.jsp.PageContext cannot be resolved to a type
- javax.servlet.jsp.pagecontext cannot be resolved to a type异常记录
- JSP页面无故报错 javax.servlet.jsp.PageContext cannot be resolved to a type
- 异常:javax.servlet.jsp.PageContext cannot be resolved to a type
- javax.servlet.jsp.PageContext cannot be resolved to a type
- javax.servlet.jsp.PageContext cannot be resolved to a type
- javax.servlet.jsp.PageContext cannot be resolved to a type
- 报错:javax.servlet.jsp.PageContext cannot be resolved to a type
- jsp代码页面报:javax.servlet.jsp.PageContext cannot be resolved to a type错误的解决办法
- 报错:javax.servlet.jsp.PageContext cannot be resolved to a type
- JSP页面报javax.servlet.jsp.PageContext cannot be resolved to a type 错误
- maven中解决javax.servlet.jsp.PageContext cannot be resolved to a type
- maven中解决javax.servlet.jsp.PageContext cannot be resolved to a type
- Eclipse javax.servlet.jsp.PageContext cannot be resolved to a type 错误解决办法
- javax.servlet.jsp.PageContext cannot be resolved to a type的解決之道