I'm trying to migrate from webLogic to Tomcat and Created 2 Dynamic projects, Project 1 and Project 2. Project 1 is deployed on Tomcat but needs resources of project 2 to run.
I below few lines of code in web.xml
<display-name>project 1</display-name>
<description>Project 1 Application</description>
<!-- Http session monitor -->
<listener>
<listener-class>HttpSessionMonitor</listener-class>
</listener>
But when I start tomcat I get "No Class Def found Error"
I have tried the below methods to fix the issue but none of them worked.
Any suggestions for this error? My project 1 is so tightly dependent of project 2 that without project 2 , 1 is so dumb.
I found my own answer after some more research.
Tomcat class loader is loading resources in below order
Therefore, from the perspective of a web application, class or resource loading looks in the following repositories, in this order:
If the web application class loader is configured with then the order becomes:
When I placed my class file in the WEB-INF/classes folder, it started working.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.