Situation:
I have several webapplications that using the same jar filename.
webapps/app.new/WEB-INF/lib/javaserver.jar
webapps/app.stable/WEB-INF/lib/javaserver.jar
webapps/app.test/WEB-INF/lib/javaserver.jar
these jarfiles are different
Problem:
if i access the webapplication with http://localhost:8080/app.stable/xxx.jsp
the classloader
will use the jarfile located in webapps/app.new/WEB-INF/javaserver.jar
if i delete the javaserver.jar in webapps/app.stable/WEB-INF/lib/ then i get
an noclassdevfound exception
if i delete the javaserver.jar in webapps/app.new/WEB-INF/lib/ then it works
if i rename all javaserver.jar files to different names like this
webapps/app.new/WEB-INF/lib/javaserver1.jar
webapps/app.stable/WEB-INF/lib/javaserver2.jar
webapps/app.test/WEB-INF/lib/javaserver3.jar
then all applications will work
for me it seems that the classloader loads the class from the javaserver.jar
file it found first in the filesystem