https://issues.apache.org/bugzilla/show_bug.cgi?id=50762

Chuck Caldarale <chuck.caldar...@unisys.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Chuck Caldarale <chuck.caldar...@unisys.com> 2011-02-11 
01:20:07 EST ---
(In reply to comment #0)
> 1) Under /webapps create a directory /foobar, and add index.html in it.
> 2) Edit the /conf/server.xml and add <context path="/foo" docBase="foobar" />.
> 3) Both /foo/index.html and /foobar/index.html are available.
> 
> I'm not sure this is spelled out anywhere, but it seems like this shouldn't
> expose /foobar/*.

First off, bugzilla is not a support forum.  If you have questions about Tomcat
usage, try the users' mailing list.

Second, your results are exactly as expected.  Note the following from the
Tomcat 7 docs: "It is NOT recommended to place <Context> elements directly in
the server.xml file."  Since you have done so, you have forced double
deployment, once under the directory name of the webapp, once again by the
explicit path setting in your <Context> element.  If you absolutely insist on
placing <Context> elements in server.xml, you should probably disable auto
deployment for the <Host> to avoid the unexpected results.  Better is to never
put <Context> elements in server.xml, and to name the webapp directory
properly.

Look here for more information:

http://tomcat.apache.org/tomcat-7.0-doc/config/host.html#Automatic%20Application%20Deployment

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to