Tomcat 6 Context, docBase and path

2009-10-27 Thread Nils Weinander

Sorry if this is a common question, I didn't find anything
like it by Google.

In a Tomcat 6, I have a Context declaration in server.xml
with a path and a docBase to a war file with a different
name than the path:

Context path=/jforum docBase=jforum-2.1.8
...
/Context

When the webapp is deployed, two directories are created
under webapps:

webapps/jforum
webapps/jforum-2.1.8

I suspect that there is a clever way to avoid this duplication,
but cannot find how.

--
mogul | nils weinander |
hudiksvallsgatan 4 113 30 stockholm sweden |
+46 8 4100 6456 | +46 709 78 28 37 |
nils.weinan...@mogul.com | skype: nils.weinander |
www.mogul.com

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



RE: Tomcat 6 Context, docBase and path

2009-10-27 Thread Caldarale, Charles R
 From: Nils Weinander [mailto:nils.weinan...@mogul.com]
 Subject: Tomcat 6 Context, docBase and path
 
 Sorry if this is a common question, I didn't find anything
 like it by Google.

Reading the actual Tomcat doc and FAQ is probably more productive.

 In a Tomcat 6, I have a Context declaration in server.xml

That's a bad idea right off; there shouldn't be any Context elements in 
server.xml.

 with a path and a docBase to a war file with a different
 name than the path:

If you insist on having the webapp name be different than its URI path, you 
must keep the webapp outside of the Host appBase directory, and place the 
Context element in conf/Catalina/[host]/[appName].xml.  The Context element 
must include the docBase attribute pointing to the absolute location of the 
webapp, and the path attribute must *not* be used.

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



Re: [SPAM] - RE: Tomcat 6 Context, docBase and path - Found word(s) if you received this in error in the Text body

2009-10-27 Thread Nils Weinander

Caldarale, Charles R wrote:

From: Nils Weinander [mailto:nils.weinan...@mogul.com]
Subject: Tomcat 6 Context, docBase and path

Sorry if this is a common question, I didn't find anything
like it by Google.


Reading the actual Tomcat doc and FAQ is probably more productive.


Tried that too...



In a Tomcat 6, I have a Context declaration in server.xml


That's a bad idea right off; there shouldn't be any Context elements in 
server.xml.


I know, but as I read the docs, that's primarily if you
need to modify contexts without restarting Tomcat and
this isn't needed here. Any other reasons?


with a path and a docBase to a war file with a different
name than the path:


If you insist on having the webapp name be different than its URI
path, you must keep the webapp outside of the Host appBase directory,
and place the Context element in conf/Catalina/[host]/[appName].xml.
The Context element must include the docBase attribute pointing to the
absolute location of the webapp, and the path attribute must *not* be used.


Thanks!

--
mogul | nils weinander |
hudiksvallsgatan 4 113 30 stockholm sweden |
+46 8 4100 6456 | +46 709 78 28 37 |
nils.weinan...@mogul.com | skype: nils.weinander |
www.mogul.com

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



RE: Tomcat 6 Context, docBase and path

2009-10-27 Thread Caldarale, Charles R
 From: Nils Weinander [mailto:nils.weinan...@mogul.com]
 Subject: Re: [SPAM] - RE: Tomcat 6 Context, docBase and path - Found
 word(s)if you received this in error in the Text body
 
 I know, but as I read the docs, that's primarily if you
 need to modify contexts without restarting Tomcat and
 this isn't needed here. Any other reasons?

Avoiding double deployments for one, as you have discovered...

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