> From: Patrick Flaherty [mailto:pflah...@rampageinc.com]
> Subject: Re: servlet access to static resources (pictures)
> 
> Based on my setup as described above which is not a war file but a
> directory that we just plunk down into appBase, should I remove the
> docBase parameter altogether (is that safe) or should it be there
> set as docBase="" (empty) which is what I have seen in my readings
> about <Context>.

The docBase attribute must *never* be set to an empty string - doing so creates 
all sorts of havoc.  It can be omitted in almost all cases except when the 
webapp is located outside of the <Host> appBase directory.

> One other item in my <Context> is path and it is set to path="" (is
> that safe).

The proper way to do this is remove the <Context> elements from server.xml.  If 
you only have one webapp, name its directory (or .war file) ROOT 
(case-sensitive), under the <Host> appBase directory.  The <Context> element, 
if needed, should be placed in [appBase]/ROOT/META-INF/context.xml, and must 
not contain path or docBase attributes.  If there's nothing left in the 
<Context> element, you don't need it at all.

> If this is the only app for this host should it be 
> set to path="/" (root) ?

No, "/" is not the default webapp; "" is.  But you shouldn't ever be setting 
path, anyway.

 - 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

Reply via email to