You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by karthikn <ka...@xius-bcgi.com> on 2008/06/06 15:52:21 UTC

Access static content ("logs" folder) ?

Hi

Refrence this URL 
http://www.nabble.com/RE%3A-Access-static-content-%28%22logs%22-folder%29---p2063441.html


My "XFLDER.xml" id as folows

<?xml version="1.0" encoding="UTF-8"?>
<Context  path="/XFLDER" docBase="${catalina.home}/logs" debug="0" />



Problem

This does not seems to work with the spec


O/s Unix Pa  Risc 11
J2sdk 1.6
TOMCAT 5.5.23




Any changes to be done


with regards
Karthik

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Access static content ("logs" folder) ?

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
----- Original Message ----- 
From: "karthikn" <ka...@xius-bcgi.com>
> ----------------------------------------------------------------------------------
> HTTP Status 404 - /XFLDER/
>
> type Status report
>
> message /XFLDER/
>
> description The requested resource (/XFLDER/) is not available.
> ---------------------------------------------------------------------------------

************
Try this

Look in CONF/WEB.XML for this
<servlet>
<servlet-name>default</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>

CHANGE THIS TO TRUE
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

THEN MAKE A logs.xml FILE in CONF/CATALINA/LOCALHOST

PUT this in it

<?xml version="1.0" encoding="UTF-8"?>

<Context docBase="${catalina.home}/logs" path="/logs"/>

Then restart TC

then type

http://localhost:8080/manager/html

see if you can see LOGS

type

http://localhost:8080/logs/

You'll see your logs

Read up on LISTING and Welcome files

Have fun..

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------






---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Access static content ("logs" folder) ?

Posted by karthikn <ka...@xius-bcgi.com>.
Hi

Thnx ... This really works




with regards
Karthik

Johnny Kewl wrote:
> ----- Original Message -----
> From: "Caldarale, Charles R" <Ch...@unisys.com>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Sunday, June 08, 2008 2:54 AM
> Subject: RE: Access static content ("logs" folder) ?
>
>
>   
>> From: Johnny Kewl [mailto:john@kewlstuff.co.za]
>> 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.
>>     
>     Cut the wings off your plane, put it into an inverted spin, and try land
> it on a tennis court --- thats golf, with 17 to go ;)
>
>   
>> 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.
>>     
>     Ah... this is what I got wrong, thx.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> .
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Access static content ("logs" folder) ?

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
----- Original Message ----- 
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Sunday, June 08, 2008 2:54 AM
Subject: RE: Access static content ("logs" folder) ?


> From: Johnny Kewl [mailto:john@kewlstuff.co.za]
> 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.
    Cut the wings off your plane, put it into an inverted spin, and try land 
it on a tennis court --- thats golf, with 17 to go ;)

> 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.
    Ah... this is what I got wrong, thx.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Access static content ("logs" folder) ?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Johnny Kewl [mailto:john@kewlstuff.co.za]
> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Access static content ("logs" folder) ?

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
----- Original Message ----- 
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Saturday, June 07, 2008 9:49 PM
Subject: RE: Access static content ("logs" folder) ?


> From: karthikn [mailto:karthik.nanjangude@xius-bcgi.com]
> Subject: Re: Access static content ("logs" folder) ?
>
> http://172.16.17.26:8080/XFLDER
> HTTP Status 404 - /XFLDER/

Which is what you should get, since there's no welcome file in the docBase 
folder.  You can use Johnny K's suggestion of enabling directory listings, 
but that can lead to disclosure of sensitive information if you're not 
careful.  (And you'd have to use correct casing, which Johnny didn't do.)

If you append the desired log file name to your URL, you'll see it in the 
browser, without having to enable directory listings.

 - Chuck

=========
Where were you yesterday?... cant leave me alone here, hey..... and run off 
and play golf  ;)
Wanted to ask you if its possible to enable a listing for just one webapp... 
couldnt figure that out.


---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--------------------------------------------------------------------------- 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Access static content ("logs" folder) ?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: karthikn [mailto:karthik.nanjangude@xius-bcgi.com]
> Subject: Re: Access static content ("logs" folder) ?
>
> http://172.16.17.26:8080/XFLDER
> HTTP Status 404 - /XFLDER/

Which is what you should get, since there's no welcome file in the docBase folder.  You can use Johnny K's suggestion of enabling directory listings, but that can lead to disclosure of sensitive information if you're not careful.  (And you'd have to use correct casing, which Johnny didn't do.)

If you append the desired log file name to your URL, you'll see it in the browser, without having to enable directory listings.

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


Re: Access static content ("logs" folder) ?

Posted by karthikn <ka...@xius-bcgi.com>.
Hi

Opps Sorry misspelled TOMCAT6014  as TOMCAT5523 ...


But the problem still continues ....



 >>Where did you place the XFLDER.xml file?

As per the form

http://www.nabble.com/RE%3A-Access-static-content-%28%22logs%22-folder%29---p2063441.html


I have placed the file XFLDER.xml at  below


"/TOMCAT6014/conf/Catalina/localhost/"


SERVERIP = 172.16.17.26
SERVERPORT = 8080
O/s Unix Pa Risc 11
J2sdk 1.6
TOMCAT6014


On Restart of Tomcat , when browsed the URL


http://172.16.17.26:8080/XFLDER


----------------------------------------------------------------------------------
HTTP Status 404 - /XFLDER/

type Status report

message /XFLDER/

description The requested resource (/XFLDER/) is not available.
---------------------------------------------------------------------------------


No errors are displayed in any of the log files at /TOMCAT6014/logs




with regards
Karthik




Caldarale, Charles R wrote:
>> From: karthikn [mailto:karthik.nanjangude@xius-bcgi.com]
>> Subject: Access static content ("logs" folder) ?
>>
>> My "XFLDER.xml" id as folows
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <Context  path="/XFLDER" docBase="${catalina.home}/logs" debug="0" />
>>     
>
> Where did you place the XFLDER.xml file?
>
> What part of "leave out the path attribute" don't you understand?
>
>   
>> This does not seems to work with the spec
>>     
>
> What is that supposed to mean?  Are you getting errors when referencing XFLDER?  If so, what errors?
>
>  - 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Access static content ("logs" folder) ?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: karthikn [mailto:karthik.nanjangude@xius-bcgi.com]
> Subject: Access static content ("logs" folder) ?
>
> My "XFLDER.xml" id as folows
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Context  path="/XFLDER" docBase="${catalina.home}/logs" debug="0" />

Where did you place the XFLDER.xml file?

What part of "leave out the path attribute" don't you understand?

> This does not seems to work with the spec

What is that supposed to mean?  Are you getting errors when referencing XFLDER?  If so, what errors?

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