Home > OS >  The import javax.servlet cannot be resolved STILL
The import javax.servlet cannot be resolved STILL

Time:11-28

Here is my Eclipse-wide JRE definition clearly showing the servlet-api.jar has been added:

enter image description here

And here are the same old import errors that just never seem to be able to be resolved. Isn't Java awesome? Any chance someone has a simple, factual answer as to why this still doesn't work?

enter image description here

CodePudding user response:

Any chance someone has a simple, factual answer as to why this still doesn't work?

Because:

And your code is trying to use the old package name.

Solutions:

  1. Change your webapp code to import from the new package, OR
  2. Roll back to a version of Tomcat that supports the older version of the JSP spec; i.e. Tomcat 9.0.x or earlier.
  • Related