Latest Method
Org. Apache. Jasper. jasperexception: Unable to compile class for JSP:
An error occurred at line: 23 in the generated Java File
The method getjspapplicationcontext (servletcontext) is undefined for the Type jspfactory
Stacktrace:
Org. Apache. Jasper. compiler. defaulterrorhandler. javacerror (defaulterrorhandler. Java: 92)
Org. Apache. Jasper. compiler. errordispatcher. javacerror (errordispatcher. Java: 330)
Org. Apache. Jasper. compiler. jdtcompiler. generateclass (jdtcompiler. Java: 423)
Org. Apache. Jasper. compiler. compiler. Compiler (compiler. Java: 308)
Org. Apache. Jasper. compiler. compiler. Compiler (compiler. Java: 286)
Org. Apache. Jasper. compiler. compiler. Compiler (compiler. Java: 273)
Org. Apache. Jasper. jspcompilationcontext. Compile (jspcompilationcontext. Java: 566)
Org. Apache. Jasper. servlet. jspservletwrapper. Service (jspservletwrapper. Java: 317)
Org. Apache. Jasper. servlet. jspservlet. servicejspfile (jspservlet. Java: 320)
Org. Apache. Jasper. servlet. jspservlet. Service (jspservlet. Java: 266)
Javax. servlet. http. httpservlet. Service (httpservlet. Java: 803)
...........................
I found many people have this problem, but there is no solution. Because I added a lot of packages (a bunch of spring dependencies) to the Lib of the project, no exception will be thrown when I delete the JSP. The repeated packages in the project and the tomcat6 lib are loaded first (that is, the same package in tomcat6 is not
The package version in the project is lower than that in Tomcat 6, causing the above exception. Check whether the same items in the project are deleted in Tomcat.
In fact, deleting from the project Lib is not useful on the Internet. It is the kind of deletion above, So I first follow the structure as before.
So what I want to delete from the following path is
F:/workdb/workspace/. Metadata/. plugins/org. Eclipse. WST. server. Core/tmp0/wtpwebapps/rzb-Web/WEB-INF/lib
You can find it in your. Metadata File. After you delete it, restart Tomcat and you will be OK.