`
hetaoo
  • 浏览: 106744 次
社区版块
存档分类
最新评论

javax.servlet.jsp.PageContext cannot be resolved to a type

阅读更多

目前在jsp页面form action中使用${pageContext.request.contextPath }/servlet的写法,但是一直提示有错误,错误如下:javax.servlet.jsp.PageContext cannot be resolved to a type

 

缺少jsp-api.jar,导入这个包之后不报错了

jsp-api.jar位于tomcat-home/common/lib下

 

我的用的是maven管理的

所以导入的是

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

 

 

分享到:
评论

相关推荐

    解决cannot be cast to javax.servlet.Filter 报错的问题

    当遇到“`cannot be cast to javax.servlet.Filter`”的错误时,通常意味着在程序运行过程中尝试将一个对象强制转换为`Filter`接口,但该对象实际类型并不符合预期。这种错误的出现可能是由于类路径(Classpath)中...

    javax.servlet.jsp-api-2.3.3.jar

    web项目里面开发jsp页面的时候,使用action调用servlet里面get和post方法的时候需要这个jar包,来获取 请求路径的

    详解 问题:HttpServlet cannot be resolved to a type

    2. `HttpServletRequest cannot be resolved to a type` 和 `HttpServletResponse cannot be resolved to a type`: 这两个错误意味着IDE同样找不到`javax.servlet.http.HttpServletRequest`和`javax.servlet....

    javax.servlet.jsp jar包

    解决jsp中out对象和pageContext不能调用方法的问题,将这一jar包下载并导入项目就可以成功解决这一问题。

    java eclipse 出现 xxx cannot be resolved to a type 错误解决方法

    Java Eclipse 出现 "xxx cannot be resolved to a type" 错误解决方法 Java Eclipse 是一个功能强大且广泛使用的集成开发环境(IDE),但是在使用过程中可能会出现各种错误信息,例如 "xxx cannot be resolved to a...

Global site tag (gtag.js) - Google Analytics