You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by lmk <lo...@yahoo.fr> on 2007/08/07 15:17:48 UTC

tomcat 5.5.23 can't have context path different from war name.

hellooo,

do you have  any solution to set the context path didfferent from the
application name,
i set the context into the META-INF directory, tomcat copied this the
contaxt into CATALINA_HOME/conf/Enginename/HostName/app_name.xml.
but the /mycontextpath  is not deployed..I still have the /app_name
context..

context.xml

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/mypath" privileged="true"
docBase="C:\apache-tomcat-5.5.23\webapps\my_webapp.war" override="true">
</Context>


thanks..



-- 
View this message in context: http://www.nabble.com/tomcat-5.5.23-can%27t-have-context-path-different-from-war-name.-tf4230057.html#a12034069
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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 5.5.23 CAN have context path different from war name.

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

lmk,

lmk wrote:
> [Is there a way] to set the context path [to something other than] the
> application name[?]

Yes. This has been discussed several times on the list.

> i set the context into the META-INF directory, tomcat copied this the
> contaxt into CATALINA_HOME/conf/Enginename/HostName/app_name.xml.

So, you used Tomcat's automatic deployment to deploy a directory or WAR
file from "webappps", right?

> but the /mycontextpath  is not deployed..I still have the /app_name
> context..

If you want to deploy an application to something other than
"/warfilename" or "/directoryname", then you need to leave your
directory (or WAR file) out of the "webapps" directory. Instead, copy
META-INF/context.xml into
$CATALINA_HOME/conf/engine/host/desired_app_name.xml and start Tomcat.

- -chris

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

iD8DBQFGuISZ9CaO5/Lv0PARAlZ2AKCKRYM0tWNVJLzLghevEgl6qIgkfwCfWJ1a
LjD4EA/Er6Rnt3Kz2oER3g8=
=gRHM
-----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 5.5.23 can't have context path different from war name.

Posted by lmk <lo...@yahoo.fr>.
thanks David.it's  well deployed now.. you are the best !!



David Smith-2 wrote:
> 
> Store the webapp outside the webapps directory, rename 
> CATALINA_HOME/conf/Enginename/HostName/app_name.xml to newAppName.xml 
> and add a docBase attribute to it pointing the way to the webapp's new 
> location.
> 
> --David
> 
> lmk wrote:
> 
>>hellooo,
>>
>>do you have  any solution to set the context path didfferent from the
>>application name,
>>i set the context into the META-INF directory, tomcat copied this the
>>contaxt into CATALINA_HOME/conf/Enginename/HostName/app_name.xml.
>>but the /mycontextpath  is not deployed..I still have the /app_name
>>context..
>>
>>context.xml
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><Context path="/mypath" privileged="true"
>>docBase="C:\apache-tomcat-5.5.23\webapps\my_webapp.war" override="true">
>></Context>
>>
>>
>>thanks..
>>
>>
>>
>>  
>>
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/tomcat-5.5.23-can%27t-have-context-path-different-from-war-name.-tf4230057.html#a12034821
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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 5.5.23 can't have context path different from war name.

Posted by David Smith <dn...@cornell.edu>.
Store the webapp outside the webapps directory, rename 
CATALINA_HOME/conf/Enginename/HostName/app_name.xml to newAppName.xml 
and add a docBase attribute to it pointing the way to the webapp's new 
location.

--David

lmk wrote:

>hellooo,
>
>do you have  any solution to set the context path didfferent from the
>application name,
>i set the context into the META-INF directory, tomcat copied this the
>contaxt into CATALINA_HOME/conf/Enginename/HostName/app_name.xml.
>but the /mycontextpath  is not deployed..I still have the /app_name
>context..
>
>context.xml
>
><?xml version="1.0" encoding="UTF-8"?>
><Context path="/mypath" privileged="true"
>docBase="C:\apache-tomcat-5.5.23\webapps\my_webapp.war" override="true">
></Context>
>
>
>thanks..
>
>
>
>  
>


---------------------------------------------------------------------
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