You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by José Perdigão <jo...@netvita.pt> on 2007/04/17 16:36:50 UTC

tomcat context

Hi,
I'm using Apache Tomcat Version 5.5.23 and I would how is it possible to 
use a context path different to the name of the
war file?
Thanks
-- 
José Miguel Perdigão
homepage: zeperdi.pt.vu <zeperdi.pt.vu>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: tomcat context

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Subject: Re: tomcat context
> 
> An alternative is to specify a <Context> element in your 
> server.xml file and specify the name of the context as well
> as the location of the WAR file.

Gotta get you out of the 4.1 mindset, Chris :-)

Do NOT put <Context> elements in server.xml; any changes to them require
a restart of Tomcat.  Rather, put the <Context> element in
conf/Catalina/[host]/[appname].xml, where appname is the desired name of
the application - it need not match the name of the .war file.  Use a
docBase attribute for <Context> that points to the .war file, which MUST
be placed outside of the <Host> appBase directory - otherwise you will
get the application deployed twice, once under the desired name, once
under the .war name.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat context

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

José,

José Perdigão wrote:
> I'm using Apache Tomcat Version 5.5.23 and I would how is it possible to
> use a context path different to the name of the war file?

Most people will suggest that you use the proper WAR file name for your
context and leave it at that.

An alternative is to specify a <Context> element in your server.xml file
and specify the name of the context as well as the location of the WAR
file. Note that in this case I think it's a big mistake to put the WAR
file into the server's "webapps" directory... you're better off putting
it somewhere else or things will act funny.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGJOOB9CaO5/Lv0PARAqC7AJ0R3yTWejoMqeztvcC8lPSQi4JgrwCggZ+D
/+qkBthCq9fQEfiiNqVWo14=
=WxhQ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat context

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
I think the answer is you dont....
Have a look at this thread

http://mail-archives.apache.org/mod_mbox/tomcat-users/200704.mbox/thread?2

== Multilevel context path problem ==
Date Tue, 10 Apr 2007



----- Original Message ----- 
From: "José Perdigão" <jo...@netvita.pt>
To: <us...@tomcat.apache.org>
Sent: Tuesday, April 17, 2007 4:36 PM
Subject: tomcat context


> Hi,
> I'm using Apache Tomcat Version 5.5.23 and I would how is it possible to 
> use a context path different to the name of the
> war file?
> Thanks
> -- 
> José Miguel Perdigão
> homepage: zeperdi.pt.vu <zeperdi.pt.vu>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org