I have same class file under classes folder and also in jar file inside lib folder.But the class is getting picked up from jar file. As per my understanding when this is the case , class under classes folder gets preference over jar file. At least this is the behaviour i have seen in glassfish. But this is not the behaviour in tomcat. Do i need to do any configuration in case of tomcat to give the preference to classes under classes folder? I am using tomcat 6.0.26.
Share
The spec (2.4) says:
So if Tomcat loads from the jar first, it’s not compliant with the spec.
Its documentation says:
So I’m surprised you’re seeing such a behavior. If you’re absolutely sure that the class is not in some jar in Tomcat’s own classpath, file a bug report. Before doing that, also make sure to clear Tomcat’s work directory, or even to start from a fresh install of Tomcat.
The workaround is of course to repackage the jar file to include your modified class instead of relying on the classloading order.