简体   繁体   中英

Compilation error on Eclipse Indigo : javax.servlet.jsp.JspException, javax.servlet.jsp.PageContext cannot be resolved to a type

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM