> From: Johnny Kewl [mailto:[EMAIL PROTECTED]
> Subject: Re: Access static content ("logs" folder) ?
>
> Where were you yesterday?... cant leave me alone here,
> hey..... and run off and play golf  ;)

That's what my boss does - and she's very good at it; never tried it myself.  I 
drive on race tracks, fly airplanes, and today, play tennis and go eagle 
watching.

> Wanted to ask you if its possible to enable a listing for
> just one webapp... couldnt figure that out.

Yes, it can be done.  You have to create a WEB-INF/web.xml file under the 
webapp's docBase, declare its own DefaultServlet, and set the listings value to 
true.  For example:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
    version="2.5">
    <servlet>
        <servlet-name>logdefault</servlet-name>
        
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>logdefault</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
</web-app>

Note that you must change the <servlet-name> to something that doesn't conflict 
with what's in the global conf/web.xml file.

It seems a little odd to have a WEB-INF directory under logs, but if that's 
what the OP wants...

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to