You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jose Monreal <jm...@gmail.com> on 2014/11/05 14:22:41 UTC

Tomcat 7 deployments context

Looking for deployment and configuration help.

Using Tomcat 7.0.56 I'm trying to deploy my applications (WAR) using the
context in the META-INF/context.xml, without luck.
I've been reading the documentation and can't find a way to do this, even
though the documentation says its possible.
What I'm getting as the context is the name of the WAR.

Is this possible to do? What files and what do I have to put inside of them?

Kind regards,
José

Re: Tomcat 7 deployments context

Posted by Jose Monreal <jm...@gmail.com>.
What am I doing wrong or its not possible at all?

Saludos cordiales,

José Ignacio Monreal Bailey  |  Ingeniero Civil en Computación



 *Cuidemos del medio ambiente. Por favor no imprimas este e-mail si no es
 necesario.*

On Wed, Nov 5, 2014 at 10:22 AM, Jose Monreal <jm...@gmail.com> wrote:

> Looking for deployment and configuration help.
>
> Using Tomcat 7.0.56 I'm trying to deploy my applications (WAR) using the
> context in the META-INF/context.xml, without luck.
> I've been reading the documentation and can't find a way to do this, even
> though the documentation says its possible.
> What I'm getting as the context is the name of the WAR.
>
> Is this possible to do? What files and what do I have to put inside of
> them?
>
> Kind regards,
> José
>

Re: Tomcat 7 deployments context

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

Jose,

On 11/5/14 12:51 PM, Jose Monreal wrote:
> Sorry for the but information or no information at all provided. 
> What I'm trying to achieve is that when deploying my app on tomcat,
> this will take the context from the META-INF/context.xml and deploy
> it with that path(context) that's different from the name of the
> war.

You need to take your META-INF/context.xml file and put it into
CATALINA_BASE/conf/[engine]/[host]/[appname].xml

> From the documentation I get that disabling autoDeploy and
> deployOnStartup should do the job, but with that configuration
> tomcat won't deploy anything at all, not even the apps already
> deployed in the webapps directory.

It will deploy the applications in conf/.../[appname].xml as above.

> Lets say my war filename is myapp.war but the context is 
> /ws/test/application/2.3/,  Is it possible for tomcat to take that
> context and deploy the app with that context? how?

Take your META-INF/context.xml file and copy it into
CATALINA_BASE/conf/[engine]/[host]/ws#test#application#2.3.xml

[engine] the name of your <Engine> in server.xml and it almost always
"Catalina". [host] is the name of the <Host> under which the context
should be deployed. If you are using a default configuration (which
seems like a good idea in general), this will be "localhost". So, put
your file into
CATALINA_BASE/conf/[engine]/[host]/ws#test#application#2.3.xml

Make sure that you:

1. Remove any "path" parameter from <Context>
2. Add a "docBase" to your ws#test#application#2.3.xml pointing to the WAR
2. Either keep autoDeploy="false" or move your WAR file out of
webapps/ and adjust the "docBase" in your deployment descriptor
accordingly, otherwise you'll get a double-deployment

Please read
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context
before replying again.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUWmupAAoJEBzwKT+lPKRY8xsP/AtD705SRAfih3sy7X5zPgGu
2SbuoOzIvjJc9hFgGOlaA1PTGKsibtX8U2kY23jylNyakt/UvQhlx76hRVPj5lI6
4IHXj3zn9u+shFo0zFKneGpDbNEmgA/v7kMt0VP0xZROCFjdjO2Jxq3Cwrmmk7K8
8cRuK3J0FA3ABrDTQAKfzqTmhVmElPIiDnp8KRIlUekiqBmgAskeoflO67eYKDsH
6Tg3gjuGiJL+9Dc8kA8my6Qtxs+I7/j2oGk3sbfQ3sruPwarbQS+ZA7JNaugUarJ
A3uaNXs2Fw3e55x0Zp9ud5SCe+J4sBEgPsQAuCRYQAwm/6JU5hWEN6SinEwvZnhQ
ZU+1NtfghBSUkHNvazbcxGUlXpwJAwHj3fwEk4ezIkv4bCUm7rj0snQf24kFl777
6jbv6ih8n/TSkS94HWmd4EKFEla0nEWzYC3u335fWFzopS+zaaSriQUQVldsQmPa
IV2/ZMNsRLnqrTXyG0uSWZs12ScLMIBDyu4nnnd7HRpd++A2ACi0cePOeSWv3BvD
bdTQVWj6JAgcPY2fXLcFSs6uVfJJXMB/24nNtTWxjakKgAeGXae9tW+9iUpoG0Za
4246P8D71SH8p451+Zb0RXObKuTIdK4E4iYJBYe7Vc94C2qSchJbGwVt09p7JDN8
0XEwugAjlPhV8uBLJw+Q
=lqob
-----END PGP SIGNATURE-----

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


Re: Tomcat 7 deployments context

Posted by Jose Monreal <jm...@gmail.com>.
Sorry for the but information or no information at all provided.
What I'm trying to achieve is that when deploying my app on tomcat, this
will take the context from the META-INF/context.xml and deploy it with that
path(context) that's different from the name of the war.
>From the documentation I get that disabling autoDeploy and deployOnStartup
should do the job, but with that configuration tomcat won't deploy anything
at all, not even the apps already deployed in the webapps directory.

Lets say my war filename is myapp.war but the context is
/ws/test/application/2.3/,  Is it possible for tomcat to take that context
and deploy the app with that context? how?

- José


On Wed, Nov 5, 2014 at 2:39 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Jose Monreal [mailto:jmonreal@gmail.com]
> > Subject: Tomcat 7 deployments context
>
> > Using Tomcat 7.0.56 I'm trying to deploy my applications (WAR) using the
> > context in the META-INF/context.xml, without luck.
>
> What exactly have you set in your context.xml?  What exactly does or does
> not happen?
>
> > I've been reading the documentation and can't find a way to do this, even
> > though the documentation says its possible.
>
> To do what?
>
> > What I'm getting as the context is the name of the WAR.
>
> Which is precisely what you should get and the documentation clearly
> states that.
>
> > Is this possible to do?
>
> Is what possible to do?
>
> You've provided essentially no information about what you're trying to do,
> what you've attempted, and what the results were.  We're not mind readers.
>
>  - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Tomcat 7 deployments context

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jose Monreal [mailto:jmonreal@gmail.com] 
> Subject: Tomcat 7 deployments context

> Using Tomcat 7.0.56 I'm trying to deploy my applications (WAR) using the
> context in the META-INF/context.xml, without luck.

What exactly have you set in your context.xml?  What exactly does or does not happen?

> I've been reading the documentation and can't find a way to do this, even
> though the documentation says its possible.

To do what?

> What I'm getting as the context is the name of the WAR.

Which is precisely what you should get and the documentation clearly states that.

> Is this possible to do?
 
Is what possible to do?

You've provided essentially no information about what you're trying to do, what you've attempted, and what the results were.  We're not mind readers.

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org