Randall,
It is the "path" of the context that makes them unique. So,
<Context path="/struts-documentation" ... />
would replace the auto-served context, where:
<Context path="/strutsdoc" ...
creates a new context. The fact that its docbase is the
same as the one for the "/struts-documentation" context is
irrelavent. If you don't want the struts-documentation.war
auto-served, move it out of the "webapps" directory and
expand it manually to a directory outside of "webapps".
Cheers,
Larry
> -----Original Message-----
> From: Randall Parker [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, August 05, 2001 2:11 AM
> To: [EMAIL PROTECTED]
> Subject: TC33b1 Context path behavior: Is this a bug or by design?
>
>
> 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/stru
> ts/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?
>