You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Prashantha H <pa...@gmail.com> on 2009/12/09 20:05:28 UTC

Re: Can Tomcat context path be multilevel

    Hi All,

    I have an application which needs to be deployed and accessed with
multilevel context path in the url.
    So I have updated the TOMCAT_HOME/Conf/Server.xml with an appropriate
entry for this.

    For Example:
    If my application name is Doc.war and I want it to be accessed using
multilevel context path dco/smartfolder. (
http://localhost:8080/dco/smartfolder/....)

    I have made the below entry in the Conf/Server.xml file.
    <Context path="/dco/smartfolder/" docBase="Doc"
reloadable="true"></Context>

    When I Start my Tomcat after making the above changes, it will end up
having two deploy folders created when it explodes, Documentum and another
dco(Within which it will have smartfolder directory).

    Is there  a way we avoid creation of this multiple folders when it gets
deployed and still be able to be access the application using the multilevel
context path?

    I have verified this in both 5.5 and 6.0.18 version of Tomcat and the
behavior is same.

    Any help is appreciated.

    Thanks,
    Prash
o

Re: Can Tomcat context path be multilevel

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

Prashantha,

On 12/9/2009 2:05 PM, Prashantha H wrote:
>     If my application name is Doc.war and I want it to be accessed using
> multilevel context path dco/smartfolder. (
> http://localhost:8080/dco/smartfolder/....)

Heh. So, you're on Windows, then? Doc.war ought to deploy to /Doc, not
to /doc (or even /dco).

>     I have made the below entry in the Conf/Server.xml file.

Don't do that: use the preferred deployment descriptor in your WAR
file's META-INF/context.xml.

>     <Context path="/dco/smartfolder/" docBase="Doc"
> reloadable="true"></Context>

In META-INF/context.xml, neither the path nor the docBase attributes are
allowed. Remove them.

The easiest thing to do is to name your WAR file dco#smartfolder.war and
it will be deployed to /dco/smartfolder

> When I Start my Tomcat after making the above changes, it will end up
> having two deploy folders created when it explodes, Documentum and another
> dco(Within which it will have smartfolder directory).

It appears that Documentum is a separate webapp, and /should/ be
deployed separately.

> Is there  a way we avoid creation of this multiple folders when it gets
> deployed and still be able to be access the application using the multilevel
> context path?

Each webapp will deploy into a separate folder, regardless of any
coincident URL mappings.

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

iEYEARECAAYFAksf/HMACgkQ9CaO5/Lv0PBxUACfWc5d+pgfjlv0Z5gC3qDYLkOP
i+oAniYl20K6sfAtecDmwQ3IqYiOm+gK
=0FSX
-----END PGP SIGNATURE-----

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