Eclipse Indigo上的编译错误:javax.servlet.jsp.JspException,javax.servlet.jsp.PageContext无法解析为类型 [英] Compilation error on Eclipse Indigo : javax.servlet.jsp.JspException, javax.servlet.jsp.PageContext cannot be resolved to a type
本文介绍了Eclipse Indigo上的编译错误:javax.servlet.jsp.JspException,javax.servlet.jsp.PageContext无法解析为类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< form action =$ {pageContext.request.contextPath} /用户>
...
< / form>
但是,应用程序运行正常,没有任何编译错误。我仔细检查servlet-api 2.5和jst 1.2 jar在Eclipse IDE中的类路径中。
如果我删除 $ {pageContext.request。 contextPath}
它不显示任何错误。
任何人都可以帮助我解决这个错误?
解决方案
有人建议添加以下依赖关系,它适用于我。
<依赖关系>
< groupId> javax.servlet< / groupId>
< artifactId> jsp-api< / artifactId>
< version> 2.0< / version>
< / dependency>
I am getting following errors while adding following EL in a jsp in eclipse indigo.
<form action="${pageContext.request.contextPath}/user">
...
</form>
However the application runs fine without any compilation error. I double check the servlet-api 2.5 and jst 1.2 jars are in class path in Eclipse IDE.
If I remove ${pageContext.request.contextPath}
it doesn't show any errors.
Can anyone one help me to get me out of this errors?
解决方案
Someone suggested to add following dependency and it worked for me.
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
</dependency>
这篇关于Eclipse Indigo上的编译错误:javax.servlet.jsp.JspException,javax.servlet.jsp.PageContext无法解析为类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文