1 Feb 01:03
Please remind me why context path for XML descriptors is coded to file name?
Yoav Shapira <yoavs <at> apache.org>
2007-02-01 00:03:13 GMT
2007-02-01 00:03:13 GMT
Hi, I know we've talked about this before and resolved Bugzilla items related to this, but I'd like to be reminded, please. Why does the following code exist as such? In org.apache.catalina.startup.HostConfig (http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java?view=annotate), deployDescriptors method (line 527), the following code: File contextXml = new File(configBase, files[i]); if (files[i].toLowerCase().endsWith(".xml")) { // Calculate the context path and make sure it is unique String nameTmp = files[i].substring(0, files[i].length() - 4); String contextPath = "/" + nameTmp.replace('#', '/'); if (nameTmp.equals("ROOT")) { contextPath = ""; } if (isServiced(contextPath)) continue; ... This code results in the (correctly documented at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html, but annoying) behavior that users deploying web applications from conf/Catalina/localhost/appname.xml context files can't set a path for their context. Instead, the path is taken right from the file name, which is less flexible.(Continue reading)
RSS Feed