Javax. servlet. jsp cannot be resolved to a type, javax. servlet
After importing a project in MyEclipse to Eclipse Luna, an inexplicable error occurs. Note: Eclipse Luna is newly installed.
Error Description: js referenced on the jsp page reports an error. When you move the cursor over it, the prompt is javax. servlet. jsp cannot be resolved to a type. Image evidence:
Similar to the above errors with red wavy lines, many jsp pages are available, but they are different.
Solution:
On the menu bar: Window → Preferences → Validation, find the "JSP Syntax Validator" item on the right and remove the √ next to the item. Click OK !!
Certificate ----------------------------------------------------------------------------------------------------------------------------------------------
When a css file is introduced to the jsp page, the error javaxservlet cannot be resolved to a type is reported. jsp has not been written for a long time.
Maybe jdk does not include the servlet-api.jar package, find this package in tomcat to copy to java project.
Project name --> right-click
Property --> select
Java Build Path --> select
Add External JARs --> select
Enter the path of the servlet-api.jar to search for the package in tomcat.
JavaxservletjspJspException cannot be resolved to a type javaxservletjspPageContext cannot be
Have you configured the JSP package under jdk/jre/lib/ext?