Exception : java.lang.NoClassDefFoundError
I am trying to run a small struts projects.
It’s working fine when all the required jars are placed in lib folder.
Following apporaches are not working.
- Add Jars
- Add External Jars
- User Library
- Web App Libraries of other project
(That project is having jars at lib folder)
There are no compilation errors but NoClassDefFoundError at run time.
Someone please let me know the issue. I would like to use User Library instead of having jars in lib folders for every new project.
All required jars must be deployed with the application; that’s just how web apps work.
In some circumstances, libraries can be put in the app container’s library. I would not recommend this for the Struts libraries. In general I wouldn’t recommend it at all.