JSP页面报javax.servlet.jsp.PageContext cannot be resolved to a type 错误
来源:互联网 发布:云安全软件下载 编辑:程序博客网 时间:2024/05/17 06:30
问题描述
在JSP内容如下时,Eclipse会出现JSP Problem如标题所示的javax.servlet.jsp.PageContext cannot be resolved to a type:
测试发现,若是jsp含有如下内容则会报上述错误:
<c:set var="path" value="${pageContext.request.contextPath}" scope="request"></c:set>
若是不含上述内容,则不报错。
解决方案
根本原因是工程中缺少Tomcat中的jsp-api.jar,需要在pom.xml中引入该jar即解决该问题了。
<dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.1</version> </dependency>
1 0
- JSP页面报javax.servlet.jsp.PageContext cannot be resolved to a type 错误
- JSP页面无故报错 javax.servlet.jsp.PageContext cannot be resolved to a type
- JSP页面无故报错 javax.servlet.jsp.PageContext cannot be resolved to a type
- JSP页面无故报错 javax.servlet.jsp.PageContext cannot be resolved to a type
- jsp页面报javax.servlet.jsp.PageContext cannot be resolved to a type:
- jsp页面报错: javax.servlet.jsp.PageContext cannot be resolved to a type
- Eclipse jsp页面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
- 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
- MyEclipse使用Maven创建web项目+搭建SSM框架教
- android 的Color表
- Python的hasattr() getattr() setattr() 函数使用方法详解
- JVM系列:jvm基本结构
- 借助postman实现模拟登陆
- JSP页面报javax.servlet.jsp.PageContext cannot be resolved to a type 错误
- Linux基本命令
- mysql行转列、列转行
- 设计模式之建造者模式
- Leetcode 448(Java)
- redis cluster 添加 删除 重分配 节点
- 综合用户特征及专家信任的协作过滤推荐算法
- 如何将服务器传来的字符串转成HTML显示在前端页面
- rman report obsolete的问题