Perfectly solve org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.index_jsp

Resolved org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.index_jsp

insert image description here

Article Directory

Error report

A friend in the fan group reported an error when he typed the code (at that time, his heart was cold for a moment, and he came to me for help, and then helped him solve it smoothly. By the way, I hope it can help more people encounter this bug. Friends who will not solve it), the error message is as follows:

The error message is very clear, that is, the class file index_jsp was not found.
Jsp is essentially a servlet, that is, a java class. Tomcat displays jsp pages by running compiled class files, and the engine that translates jsp files into java files is tomcat's jasper. But there is no lack of this part of the jar package inside my tomcat.

The error message is very clear, that is, the class file index_jsp was not found.
Jsp is essentially a servlet, that is, a java class. Tomcat displays jsp pages by running compiled class files, and the engine that translates jsp files into java files is tomcat's jasper. But there is no lack of this part of the jar package inside my tomcat.

Because the project itself introduces servlet-api and jsp-api packages that may conflict with tomcat's own packages, of course it does not rule out other package conflicts. Using the maven helper plug-in, check the pom file of the project and find that there is no jar package conflict.

insert image description here

Solution

The solution is as follows

insert image description here
Open the pom.xml file of the project.
Click Dependency Analyzer in the lower left corner.
insert image description here
Select conflicts to check whether there are jar package conflicts in the project.
insert image description here
The second attempt
ran to myeclipse to redeploy the environment of this project, and found that a new error was reported.
insert image description here
Nothing wrong, just did not find the jstl package, found that tomcat9.0 does not have this package in the real lib, and then changed the scope attribute of the jstl package in the pom to compile, and the problem was solved

Welfare

6 technical books will be sent home every week
due to the limited time and energy of the blogger, and there are too many private messages every day, so it is impossible for every fan to reply in time. You
can enter the community skirt or add the blogger’s WeChat
and click the link below
http:/ /t.csdn.cn/6kInJ

Guess you like

Origin blog.csdn.net/weixin_50843918/article/details/130674907