Overriding a class file from a library JAR in a Java web app - Stack Overflow
The answer depends upon your container, it is container dependent. In general, /WEB-INF/classes is preferred to classes in a jar file in WEB-INF/lib.
For Tomcat, the order is the following:
Therefore, from the perspective of a web application, class or resource loading looks in the following repositories, in this order:
- Bootstrap classes of your JVM
- System class loader classes
- /WEB-INF/classes of your web application
- /WEB-INF/lib/*.jar of your web application
- Common class loader classes
Read full article from Overriding a class file from a library JAR in a Java web app - Stack Overflow
No comments:
Post a Comment