I'm seeing two different paths as being accepted for pages in the same war file. I'm 
wondering 
if the behavior I'm seeing is by design or a bug. 

I installed the struts-documentation.war file in webapps and restarted Tomcat 3.3 b1. 
As 
expected I was able to access such URLs as:
   http://127.0.0.1:8080/struts-documentation/index.html
and 
   
http://127.0.0.1:8080/struts-documentation/api/org/apache/struts/taglib/bean/package-
summary.html#package_description

So the leading /struts-documentation mapped to the corresponding war file.

Then I decided to add to the /conf dir the following:
   apps-struts-documentation.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<webapps>
    <!-- Setting special properties for /examples 
         ( as an example of overriding the defaults )
      -->

   <Context path="/strutsdoc" 
            docBase="webapps/struts-documentation" 
            debug="0" 
            reloadable="true" > 
              <SimpleRealm filename="conf/users/strutsdoc-users.xml" />
              <LogSetter name="strutsdoc_tc.log" path="logs/strutsdoc.log" />
              <LogSetter name="strutsdoc_servlet_log" 
                         path="logs/servlet_strutsdoc.log" 
                         servletLogger="true"/>
  </Context>

</webapps>

After stopping and restarting Tomcat I was then able (as expected) to access pages 
using 
the shorter /strutsdoc leading path. For instance:
   http://127.0.0.1:8080/strutsdoc/index.html

However, when I went back and tried the original:
      http://127.0.0.1:8080/struts-documentation/index.html
 that still worked. I even did Refresh and fired up a different brand of browser that 
hadn't 
previously visited either page to make sure the browser wasn't just loading the older 
URL from 
cache.

Well, I'd expect that when one defined the Context path in the xml file that that path 
would 
_replace_ the default path named after the war file. Is that not the case? Is this 
normal 
behavior or incorrect behavior?




Reply via email to