You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Maxim Kazitov <mv...@gmail.com> on 2009/11/07 16:51:09 UTC
How to configure App for static files
Is it any way to configure Tomcat to serve static files from particular
folder on the disk ? I suspect It should be some kind of simple application,
but have no idea how to configure it.
Any help/hints are welcome.....
RE: How to configure App for static files
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Maxim Kazitov [mailto:mvkazit@gmail.com]
> Subject: How to configure App for static files
>
> Is it any way to configure Tomcat to serve static files from particular
> folder on the disk ?
Assuming you're using a supported version of Tomcat (you didn't tell us), create a file named conf/Catalina/[host]/[appName].xml that contains a <Context> element with a docBase attribute pointing to the directory of interest. The value of [host] depends on what you have in server.xml; the default is localhost. The value of [appName] is the URI path to use to access the static information.
For the current Tomcat version, the doc is here:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
- 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: How to configure App for static files
Posted by Hassan Schroeder <ha...@gmail.com>.
On Sat, Nov 7, 2009 at 7:51 AM, Maxim Kazitov <mv...@gmail.com> wrote:
> Is it any way to configure Tomcat to serve static files from particular
> folder on the disk ? I suspect It should be some kind of simple application,
> but have no idea how to configure it.
You can create a separate Context with an docBase anywhere; see
the documentation for your version.
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org