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=42354>. 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=42354 Summary: Web App JAR's are not scanned for TLD's if a space in the path Product: Tomcat 5 Version: 5.5.23 Platform: PC OS/Version: All Status: NEW Severity: major Priority: P2 Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] TLD's are not processed if the webapp is in a folder that has a space in it. Myspaces is failing using Tomcat 5.5 because its listener was not being invoked. I traced the problem with the debugger and found the problem. JAR files in the WEB-INF/lib folder were supposed to be scanned for TLD's. The method getJarPaths in startup/TldConfig.java[1] is supposed to return all the JAR files that have a TLD within them. This method is not working correctly. The problem is with how the path to the JAR files is locoated. First all the classpath entries for the webapp are converted to URL's. URL[] urls = ((URLClassLoader) loader).getURLs(); Then to test to see the file exists a java.io.File is used File file = new File(urls[i].getFile()); try { file = file.getCanonicalFile(); } catch (IOException e) { // Ignore } if (!file.exists()) { // file.exists() RETURNING FALSE continue; } The problem is to do with converting spaces. The paths on my web app all looked something like "file:///c:/Documents%20%and%20Settings/foo/bar". The File class does not understand the %20 as a space. A hack would be to add a .replaceAll("%20", " ") but i'm sure this will cause problems somewhere. And is %20 valid in a File URI? [1] http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/ apache/catalina/startup/TldConfig.java -- 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]