我在 eclipse indigo 的 jsp 中添加以下 EL 时遇到以下错误。
<form action="${pageContext.request.contextPath}/user">
...
</form>
但是应用程序运行良好,没有任何编译错误。我仔细检查了 servlet-api 2.5 和 jst 1.2 jar 是否位于 Eclipse IDE 的类路径中。
如果我删除 ${pageContext.request.contextPath}
它不会显示任何错误。
任何人都可以帮助我摆脱这个错误吗?
最佳答案
有人建议add following dependency这对我有用。
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
</dependency>
关于eclipse - Eclipse Indigo 上的编译错误 : javax. servlet.jsp.JspException,javax.servlet.jsp.PageContext 无法解析为类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8879314/