You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Behrang S. Zadeh" <be...@gmail.com> on 2010/04/26 01:58:56 UTC
Context accesible in two context paths while it must be accessible in
only one
Hi all,
I have defined a very simple Web application and stored it under
webapps/example. I have also defined a Context file for it named example.xml
and placed it under conf/Catalina/localhost. The content of example.xml file
is:
<Context path="/example1" docBase="example"
debug="1">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_example_log." suffix=".txt"
timestamp="true"/>
</Context>
Now I assume that this Web app must only be accessible via
http://localhost:8080/example1. However it is accessible via both
http://localhost:8080/example1 and http://localhost:8080/example. Any ideas
why is this happening?
The deployment server is *Tomcat 5.0.30*. The whole server directory can be
downloaded from: http://public.me.com/behrangsa
Thanks in advance,
Behrang
Re: Context accesible in two context paths while it must be
accessible in only one
Posted by "Behrang S. Zadeh" <be...@gmail.com>.
Thanks! You made my day! :)
On Mon, Apr 26, 2010 at 12:06 PM, Hassan Schroeder <
hassan.schroeder@gmail.com> wrote:
> On Sun, Apr 25, 2010 at 7:02 PM, Behrang S. Zadeh <be...@gmail.com>
> wrote:
> > So what's the purpose of the path="..." element then?
>
> Only useful if you're deploying outside the given host's appBase.
>
> There's lots of discussions of this in the archives :-)
>
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> twitter: @hassan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Context accesible in two context paths while it must be
accessible in only one
Posted by Hassan Schroeder <ha...@gmail.com>.
On Sun, Apr 25, 2010 at 7:02 PM, Behrang S. Zadeh <be...@gmail.com> wrote:
> So what's the purpose of the path="..." element then?
Only useful if you're deploying outside the given host's appBase.
There's lots of discussions of this in the archives :-)
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Context accesible in two context paths while it must be
accessible in only one
Posted by "Behrang S. Zadeh" <be...@gmail.com>.
So what's the purpose of the path="..." element then?
On Mon, Apr 26, 2010 at 11:53 AM, Hassan Schroeder <
hassan.schroeder@gmail.com> wrote:
> On Sun, Apr 25, 2010 at 4:58 PM, Behrang S. Zadeh <be...@gmail.com>
> wrote:
>
> > I have defined a very simple Web application and stored it under
> > webapps/example.
>
> > Now I assume that this Web app must only be accessible via
> > http://localhost:8080/example1.
>
> A bad assumption; Tomcat will deploy it as /example. Get rid of that
> 'example.xml' and rename your deployment directory to whatever you
> want it to be.
>
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> twitter: @hassan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Context accesible in two context paths while it must be
accessible in only one
Posted by Hassan Schroeder <ha...@gmail.com>.
On Sun, Apr 25, 2010 at 4:58 PM, Behrang S. Zadeh <be...@gmail.com> wrote:
> I have defined a very simple Web application and stored it under
> webapps/example.
> Now I assume that this Web app must only be accessible via
> http://localhost:8080/example1.
A bad assumption; Tomcat will deploy it as /example. Get rid of that
'example.xml' and rename your deployment directory to whatever you
want it to be.
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org