DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=42163>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42163 Summary: Subfolders taken as applications by Automatic Application Deployment Product: Tomcat 6 Version: 6.0.10 Platform: Other OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] This had me stumped for a few hours today... In server.xml, when a Host has deployOnStartup="true" or autoDeploy="true", it seems that Tomcat is taking all folders within the appBase to be separate applications, whether or not they have a WEB-INF/web.xml. This problem happened for me when there was only one Context - the application within appBase. I'm not sure if it happens when multiple contexts are defined. So, for example, lets say you have an application with the following in the root directory: index.jsp /subdir /subdir/index.jsp /WEB-INF /WEB-INF/web.xml There's no problem accessing http://mydomain.com/index.jsp (or any other page within the main directory). However, if you try to access http://mydomain.com/subdir/ or anything within that subdirectory, the request won't get to your application code, as Tomcat will assume that the request is for an application deployed in /subdir (an application which doesn't exist). I've found one of two things happening: 1. If the URL doesn't map to a real file e.g. /subdir/madeupURL: Tomcat just returns a 404 error. 2. If the URL does map to a real file e.g. /subdir/index.jsp: Tomcat will log a WARN "Internal Error: File /WEB-INF/web.xml not found", and try to execute the file at /subdir/index.jsp (in my case failing with a misleading error because the index.jsp file relies on stuff in the application classpath...). Basically the problem seems to be that the check for a WEB-INF/web.xml isn't happening properly. So subdirectories are getting labelled as applications even if they don't have a WEB-INF/web.xml. The workaround is easy: set the Host attributes deployOnStartup="false" and autoDeploy="false" in server.xml. Cheers, Martin -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]