I have this weird error in a .jsp page in eclipse:
javax.servlet.jsp.PageContext cannot be resolved to a type
My project is a maven project imported into "as an existing maven project" into juno with m2e and m2e-wtp plugins installed.
Is this a bug of the m2e plugins ? If yes, what's a possible workaround to get rid of this error (and the red mark in the workspace explorer) ?
Otherwise, do I need to "tell" to maven that my project contains jsp pages ? And hopefully, the m2e plugin will add the right library to the classpath. If yes, how ?
The solution that worked for me, is given in this answer. Go to project properties > Targeted runtimes > Select the checkbox for a runtime (Apache Tomcat 7 in my case).
That's all. Just build the project now and everything will be fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With