After deploying a J2EE project today, this error occurs:
Java. Lang. abstractmethoderror: javax. servlet. jsp. jspfactory. getjspapplicationcontext (ljavax/servlet/servletcontext;) ljavax/servlet/JSP/jspapplicationcontext;
Yesterday was good, but today I went wrong. I checked the solution online. Find a feasible method:
1. delete the two jar packages under the webroot/WEB-INF/Li directory in the project deployed to the server, and then restart the server and OK to delete the jar package is: javax. servlet. jar javax. servlet. jap. the reason for jar is that the Lib package in Tomcat also contains these two jar packages, and the jar package conflicts.
After deleting these two jars, the two packages will still appear under lib after myeclipse compilation again, which will be depressing. I tried a few more times and the results were the same. After finding the classpath, I found that the two packages are actually under the J2EE library. I think this error must be related to the two packages. I simply took another project for testing, compile again, but the Lib of the project does not add the two packages.
2. There is also an explanation on the Internet that the two packages conflict with the lib packages under tomcat, but the two packages are not found in Tomcat Lib, which is a bit depressing at a time.
3. Another problem on the Internet is to delete the project that has been released under Tomcat and re-release it once. I also tried it.
I have tried these methods, but I still cannot. Then, I integrated the struts and lib packages under the project, and deleted the repeated packages. After the operation, I passed... The javax. servlet. Jar javax. servlet. Jap. Jar packages under the project lib have not been regenerated ..
I can't explain this. Maybe there is an operation in the middle that I didn't notice, and then the two packages won't be published to the root directory. As a result, we were lucky enough to solve the problem.
In short, this problem is annoying. However, it would be helpful to be more familiar with the principles of Tomcat and project release and compilation in the process of solving the problem.