How to configure App for static files

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown How to configure App for static files

by Maxim Kazitov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

by Hassan Schroeder-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Nov 7, 2009 at 7:51 AM, Maxim Kazitov <mvkazit@...> 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@...
twitter: @hassan

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


RE: How to configure App for static files

by Caldarale, Charles R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> From: Maxim Kazitov [mailto:mvkazit@...]
> 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@...
For additional commands, e-mail: users-help@...