This is my web.xml Code,While running I am getting error like this..How to resolve this?
\"SEVERE: Exception starting filter Struts java.lang.ClassNotFoundEx
Another solution, if the rest of answers doesn't work for you
If you put the right package path (without .ng..) and you still get:
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
I had the same problem but none of this solutions works, because I got the same error using the right path but the reason was how the class loader load the classes.
The solution is to set in the WAS "Classes loaded with local class loader first (parent last)"
To do this:
- Click on WebSphere enterprise applications.
- Choose your enterprise application
- Click on Manage Modules.
- Click on your module.
- "Select Classes loaded with local class loader first (parent last)" from the Class loader order drop down list.
- Click on OK.
- Click on Save.
- restart the websphere server (or virtual server in my case).
If this work for you then the best way of doing this is setting an deployment.xml in the EAR project, so in futures deployment this is setted automated:
I found out the solution here: Solution - class loader configuration in WAS