Created attachment 31586 [details] Sample application demonstrating the issue with case insensitivity. In my web application I have a package com.mycomp. This package has another package named actions and also a class named Actions.class. Tomcat 8.0.5 is unable to differentiate between the class Actions.class and the package actions. This is resulted in the below exception: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: [14] in the generated java file: [C:\apache-tomcat-8.0.5\work\Catalina\localhost\customapp\org\apache\jsp\index_jsp.java] The import com.mycomp.actions cannot be resolved Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:199) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:475) org.apache.jasper.compiler.Compiler.compile(Compiler.java:380) org.apache.jasper.compiler.Compiler.compile(Compiler.java:355) org.apache.jasper.compiler.Compiler.compile(Compiler.java:342) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347) javax.servlet.http.HttpServlet.service(HttpServlet.java:725) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) Perhaps there is no case sensitive comparision with this version that is causing the issue. However, I tried deploying this webapp in tomcat 8.0.3, it worked fine without throwing an exception. I have attached a sample war file with the demonstration.
*** This bug has been marked as a duplicate of bug 47323 ***
Why there is a change in behavior in tomcat 8.0.3 and tomcat 8.0.5 version? Why does it work in 8.0.3 but not in 8.0.5 under the same OS? Can you please confirm the actual root cause for this? Thanks, Hariprasad
Comment on attachment 31586 [details] Sample application demonstrating the issue with case insensitivity. Your sample application is a Rar archive instead of a Zip one.
Created attachment 31595 [details] (customapp.war) Sample application demonstrating the issue with case insensitivity. Re-uploading the sample application. Repacked as a zip file. I confirm that the issue is reproducible with the current 8.0.x trunk.
While the root cause of this is the case insensitivity of URLClassLoader, this was exposed by a change to the way addURLs() was handled. I have implemented an alternative fix to that problem that avoids this issue. The fix will be in 8.0.6 onwards.
Thanks for addressing this issue. I tested it successfully; it's been resolved now. Regards, Hariprasad