Re: How to set up a special folder to list all files under it?

2007-01-02 Thread Michael Hencin
I am not sure there is a similar feature in Tomcat. I did some research before 
I did this and could not find a similar feature, or at least one I understood 
to work like that.
It requires Apache or IIS, I suppose most web servers provide a virtual 
directory  feature 
---
Michael Hencin
President - Enginuity Development Inc.
[EMAIL PROTECTED]
P: 815-301-9939
F: 815-301-2007

- Original Message 
From: kkus <[EMAIL PROTECTED]>
To: users@tomcat.apache.org
Sent: Tuesday, January 2, 2007 11:29:10 AM
Subject: Re: How to set up a special folder to list all files under it?


How can I use this feature of virtual directory in 5.5.20? Any example or
docs? I don't have Apache installed or IIS associated with Tomcat in my box.


Michael Hencin wrote:
> 
> 
> 
> Hello, I noticed the mention of symbolic links and it was
> similar enough to what I did in our application to provide a kind of
> "symbolic link" in our application. The method I cam up with allowed
> the user to user tomcat, and then also create a directory outside the
> context
> of our web app that is used to store files. We allow users to attach files
> within our application that are related to database entries. 
> 
> 
> The problem we had was that we wanted to have a location
> deliberately outside the context of the web app for two reasons. 1)
> Redeployment
> risked deleting the saved files (they act as an archive and must be saved)
> 2)
> disk location growth. These files can be very large, and we wanted to
> provide a
> way to let the end users easily place them on another volume or disk. So
> we now
> have the users create a virtual directory. We use apache web server. This
> virtual directory is linked to the file location. then we have them enter
> that
> virtual directory path into our database, and its served up on the pages.
> This
> then lets the users follow the link to the virtual directory, and apache
> takes
> care of the listings. 
> 
> 
> We do not use apache as a front end at all, just in this case
> we use its virtual directory feature. Tomcat does a fine enough job of the
> web
> serving we need. but in this once case, where we wanted to show files i a
> difference place, not in the context of the web app I came up with this
> kind of
> work around. Before that we just used a UNC path stored in the database,
> but it
> did not work well with firebird and safari, and users outside the network
> could
> not follow the UNC link. 
> 
> 
>  
> 
> 
> This method of using a virtual directory from apache (or IIS
> ) seems to work nicely.
> 
> 
>  
> ---
> Michael Hencin
> President - Enginuity Development Inc.
> [EMAIL PROTECTED]
> P: 815-301-9939
> F: 815-301-2007
> 
> ----- Original Message 
> From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
> To: Tomcat Users List 
> Sent: Monday, January 1, 2007 12:48:16 AM
> Subject: RE: How to set up a special folder to list all files under it?
> 
>> From: kkus [mailto:[EMAIL PROTECTED] 
>> Subject: How to set up a special folder to list all files under it?
>> 
>> Now I need add a specific folder which will let user to browse
>> all files under it without authentication.
> 
> I haven't personally tried the following, so take it with a grain of
> salt.  Also, others might know an easier way to accomplish what you
> want.
> 
> Delivery of static content and directory listings is under control of
> the default servlet, as defined in the conf/web.xml file.  By default,
> this has the listings param set to false, to disable ad hoc browsing.  I
> think you could copy the config for the default servlet, change
>  from default to something appropriate for your purpose,
> set the listings param to true, and add a servlet mapping for this
> renamed default to use a  pointing to the directory you
> want to store your public files in.  You would want to put this
> redefined servlet definition and mapping in the WEB-INF/web.xml of the
> webapp that will hold the public directory.
> 
>  - 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]
> 
> 
> 
> 
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-set-up-a-special-folder-to-list-all-files-under-it--tf2903441.html#a8127336
Sent from the Tomcat - User mailing list archive at Nabble.com.


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









Re: How to set up a special folder to list all files under it?

2007-01-02 Thread kkus

How can I use this feature of virtual directory in 5.5.20? Any example or
docs? I don't have Apache installed or IIS associated with Tomcat in my box.


Michael Hencin wrote:
> 
> 
> 
> Hello, I noticed the mention of symbolic links and it was
> similar enough to what I did in our application to provide a kind of
> "symbolic link" in our application. The method I cam up with allowed
> the user to user tomcat, and then also create a directory outside the
> context
> of our web app that is used to store files. We allow users to attach files
> within our application that are related to database entries. 
> 
> 
> The problem we had was that we wanted to have a location
> deliberately outside the context of the web app for two reasons. 1)
> Redeployment
> risked deleting the saved files (they act as an archive and must be saved)
> 2)
> disk location growth. These files can be very large, and we wanted to
> provide a
> way to let the end users easily place them on another volume or disk. So
> we now
> have the users create a virtual directory. We use apache web server. This
> virtual directory is linked to the file location. then we have them enter
> that
> virtual directory path into our database, and its served up on the pages.
> This
> then lets the users follow the link to the virtual directory, and apache
> takes
> care of the listings. 
> 
> 
> We do not use apache as a front end at all, just in this case
> we use its virtual directory feature. Tomcat does a fine enough job of the
> web
> serving we need. but in this once case, where we wanted to show files i a
> difference place, not in the context of the web app I came up with this
> kind of
> work around. Before that we just used a UNC path stored in the database,
> but it
> did not work well with firebird and safari, and users outside the network
> could
> not follow the UNC link. 
> 
> 
>  
> 
> 
> This method of using a virtual directory from apache (or IIS
> ) seems to work nicely.
> 
> 
>  
> ---
> Michael Hencin
> President - Enginuity Development Inc.
> [EMAIL PROTECTED]
> P: 815-301-9939
> F: 815-301-2007
> 
> ----- Original Message ----
> From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
> To: Tomcat Users List 
> Sent: Monday, January 1, 2007 12:48:16 AM
> Subject: RE: How to set up a special folder to list all files under it?
> 
>> From: kkus [mailto:[EMAIL PROTECTED] 
>> Subject: How to set up a special folder to list all files under it?
>> 
>> Now I need add a specific folder which will let user to browse
>> all files under it without authentication.
> 
> I haven't personally tried the following, so take it with a grain of
> salt.  Also, others might know an easier way to accomplish what you
> want.
> 
> Delivery of static content and directory listings is under control of
> the default servlet, as defined in the conf/web.xml file.  By default,
> this has the listings param set to false, to disable ad hoc browsing.  I
> think you could copy the config for the default servlet, change
>  from default to something appropriate for your purpose,
> set the listings param to true, and add a servlet mapping for this
> renamed default to use a  pointing to the directory you
> want to store your public files in.  You would want to put this
> redefined servlet definition and mapping in the WEB-INF/web.xml of the
> webapp that will hold the public directory.
> 
>  - 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]
> 
> 
> 
> 
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-set-up-a-special-folder-to-list-all-files-under-it--tf2903441.html#a8127336
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: How to set up a special folder to list all files under it?

2007-01-02 Thread Michael Hencin


Hello, I noticed the mention of symbolic links and it was
similar enough to what I did in our application to provide a kind of
"symbolic link" in our application. The method I cam up with allowed
the user to user tomcat, and then also create a directory outside the context
of our web app that is used to store files. We allow users to attach files
within our application that are related to database entries. 


The problem we had was that we wanted to have a location
deliberately outside the context of the web app for two reasons. 1) Redeployment
risked deleting the saved files (they act as an archive and must be saved) 2)
disk location growth. These files can be very large, and we wanted to provide a
way to let the end users easily place them on another volume or disk. So we now
have the users create a virtual directory. We use apache web server. This
virtual directory is linked to the file location. then we have them enter that
virtual directory path into our database, and its served up on the pages. This
then lets the users follow the link to the virtual directory, and apache takes
care of the listings. 


We do not use apache as a front end at all, just in this case
we use its virtual directory feature. Tomcat does a fine enough job of the web
serving we need. but in this once case, where we wanted to show files i a
difference place, not in the context of the web app I came up with this kind of
work around. Before that we just used a UNC path stored in the database, but it
did not work well with firebird and safari, and users outside the network could
not follow the UNC link. 


 


This method of using a virtual directory from apache (or IIS
) seems to work nicely.


 
---
Michael Hencin
President - Enginuity Development Inc.
[EMAIL PROTECTED]
P: 815-301-9939
F: 815-301-2007

- Original Message 
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Monday, January 1, 2007 12:48:16 AM
Subject: RE: How to set up a special folder to list all files under it?

> From: kkus [mailto:[EMAIL PROTECTED] 
> Subject: How to set up a special folder to list all files under it?
> 
> Now I need add a specific folder which will let user to browse
> all files under it without authentication.

I haven't personally tried the following, so take it with a grain of
salt.  Also, others might know an easier way to accomplish what you
want.

Delivery of static content and directory listings is under control of
the default servlet, as defined in the conf/web.xml file.  By default,
this has the listings param set to false, to disable ad hoc browsing.  I
think you could copy the config for the default servlet, change
 from default to something appropriate for your purpose,
set the listings param to true, and add a servlet mapping for this
renamed default to use a  pointing to the directory you
want to store your public files in.  You would want to put this
redefined servlet definition and mapping in the WEB-INF/web.xml of the
webapp that will hold the public directory.

 - 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]









Re: How to set up a special folder to list all files under it?

2007-01-01 Thread Mark Thomas
Caldarale, Charles R wrote:
>> From: Mark Thomas [mailto:[EMAIL PROTECTED] 
>> Subject: Re: How to set up a special folder to list all files 
>> under it?
>>
>> Have a look at 
>> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>
>> you want the allowLinking attribute
> 
> The OP is running on WinXP; is allowLinking safe to use on that platform
> now?  The doc seems pretty adamant about not enabling it for Windows.

Sorry should have read the post more closely. No - this is not safe on
Windows.

Mark


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



RE: How to set up a special folder to list all files under it?

2007-01-01 Thread Caldarale, Charles R
> From: Mark Thomas [mailto:[EMAIL PROTECTED] 
> Subject: Re: How to set up a special folder to list all files 
> under it?
> 
> Have a look at 
> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
> 
> you want the allowLinking attribute

The OP is running on WinXP; is allowLinking safe to use on that platform
now?  The doc seems pretty adamant about not enabling it for Windows.

 - 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]



Re: How to set up a special folder to list all files under it?

2007-01-01 Thread Mark Thomas
kkus wrote:
> Under listing directory, is there any way putting a file link there since I
> want to put physical file in a different disk? I tried and it showed me a
> file with a link, but after I clicked this test.lnk it can't show me the
> physical file at all. Thanks!

Have a look at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

you want the allowLinking attribute

Mark


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



Re: How to set up a special folder to list all files under it?

2007-01-01 Thread Martin Gainty
a good tutorial for constructing URLS is located here
http://www.javaworld.com/javaworld/javatips/jw-javatip66.html





In my situation I have a contextPath which points to 
$CATALINA_BASE\webapps\WebAppName (so this href tag will display 
AutoCompleteServlet.java.txt)
Java
 source

I could have just as easily setup to point to a local file in Unix such as 
Index.html

or to point to a local file on a windows box
Index.html




HTH
Martin --
--- 
This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary , confidential and exempt from disclosure. If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.
--- 
Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
destinataire de ce document, nous vous signalons qu'il est strictement interdit 
de le diffuser, de le distribuer ou de le reproduire.
- Original Message - 
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, January 01, 2007 1:26 PM
Subject: RE: How to set up a special folder to list all files under it?


> From: Caldarale, Charles R 
> Subject: RE: How to set up a special folder to list all files 
> under it?
> 
> You don't have to create any classes.  Just do what I said in 
> the original response, which is to copy the existing 
> declaration for the default servlet from conf/web.xml to your 
> own WEB-INF/web.xml.

In case I didn't make it clear before, the idea is to create a copy of
the default servlet specifically for your webapp.  This renamed copy
will allow access to and listings of the directory specified in its
, and nothing else.  The normal default servlet would
continue to supply static content for all other paths, without exposing
their directory structure.

 - 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]



RE: How to set up a special folder to list all files under it?

2007-01-01 Thread Caldarale, Charles R
> From: kkus [mailto:[EMAIL PROTECTED] 
> Subject: RE: How to set up a special folder to list all files 
> under it?
> 
> Under listing directory, is there any way putting a file link 
> there since I want to put physical file in a different disk?

This isn't really a Tomcat issue.  The Windows implementation of soft
links is a bit strange, as you're finding out.  However, there are ways
to make it work, mostly.  Try looking at this:
http://shell-shocked.org/article.php?id=284

 - 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]



RE: How to set up a special folder to list all files under it?

2007-01-01 Thread kkus

Under listing directory, is there any way putting a file link there since I
want to put physical file in a different disk? I tried and it showed me a
file with a link, but after I clicked this test.lnk it can't show me the
physical file at all. Thanks!


Caldarale, Charles R wrote:
> 
>> From: Caldarale, Charles R 
>> Subject: RE: How to set up a special folder to list all files 
>> under it?
>> 
>> You don't have to create any classes.  Just do what I said in 
>> the original response, which is to copy the existing 
>> declaration for the default servlet from conf/web.xml to your 
>> own WEB-INF/web.xml.
> 
> In case I didn't make it clear before, the idea is to create a copy of
> the default servlet specifically for your webapp.  This renamed copy
> will allow access to and listings of the directory specified in its
> , and nothing else.  The normal default servlet would
> continue to supply static content for all other paths, without exposing
> their directory structure.
> 
>  - 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-set-up-a-special-folder-to-list-all-files-under-it--tf2903441.html#a8118643
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: How to set up a special folder to list all files under it?

2007-01-01 Thread Caldarale, Charles R
> From: Caldarale, Charles R 
> Subject: RE: How to set up a special folder to list all files 
> under it?
> 
> You don't have to create any classes.  Just do what I said in 
> the original response, which is to copy the existing 
> declaration for the default servlet from conf/web.xml to your 
> own WEB-INF/web.xml.

In case I didn't make it clear before, the idea is to create a copy of
the default servlet specifically for your webapp.  This renamed copy
will allow access to and listings of the directory specified in its
, and nothing else.  The normal default servlet would
continue to supply static content for all other paths, without exposing
their directory structure.

 - 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]



RE: How to set up a special folder to list all files under it?

2007-01-01 Thread Caldarale, Charles R
> From: kkus [mailto:[EMAIL PROTECTED] 
> Subject: Re: How to set up a special folder to list all files 
> under it?
> 
> Still confused with servlet class 
> (FullPackageNameOfServletClass) here. What
> is required in building such a class?

You don't have to create any classes.  Just do what I said in the
original response, which is to copy the existing declaration for the
default servlet from conf/web.xml to your own WEB-INF/web.xml.  Change
the name of the servlet, but not the servlet class - leave that as:
org.apache.catalina.servlets.DefaultServlet

Also change the  for listings to true (in your copy), and
supply a servlet mapping for the renamed servlet to use the directory
that has your public files.

 - 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]



Re: How to set up a special folder to list all files under it?

2007-01-01 Thread kkus

Still confused with servlet class (FullPackageNameOfServletClass) here. What
is required in building such a class? Can you provide a sample? Thanks!


Martin Gainty wrote:
> 
> 1)yes you need to setup the listings options for your servlet in web.xml
> as in 
>
>NameOfServlet
>FullPackageNameOfServletClass
> 
> listings
> true
> 
>   
> 2)make sure you copy your viewable (txt) files to the the
> webapps/WEBAPPNAME (Note the WEB-INF folder is for web.xml, /classes and
> /lib)
>  ${contextPath}/src/org/ajaxtags/demo/servlet/AutocompleteServlet.java.txt
> Java source 
> 3)ensure the files that you wish to view have an extension that your
> browser will know to associate with text editor(as in .txt extension for
> vi or wordpad)
> 
> (Expanding on previous poster's extremely late nite posting..)
> 
> M-
> --- 
> This e-mail message (including attachments, if any) is intended for the
> use of the individual or entity to which it is addressed and may contain
> information that is privileged, proprietary , confidential and exempt from
> disclosure. If you are not the intended recipient, you are notified that
> any dissemination, distribution or copying of this communication is
> strictly prohibited.
> --- 
> Le présent message électronique (y compris les pièces qui y sont annexées,
> le cas échéant) s'adresse au destinataire indiqué et peut contenir des
> renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le
> destinataire de ce document, nous vous signalons qu'il est strictement
> interdit de le diffuser, de le distribuer ou de le reproduire.
> - Original Message - 
> From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" 
> Sent: Monday, January 01, 2007 1:48 AM
> Subject: RE: How to set up a special folder to list all files under it?
> 
> 
>> From: kkus [mailto:[EMAIL PROTECTED] 
>> Subject: How to set up a special folder to list all files under it?
>> 
>> Now I need add a specific folder which will let user to browse
>> all files under it without authentication.
> 
> I haven't personally tried the following, so take it with a grain of
> salt.  Also, others might know an easier way to accomplish what you
> want.
> 
> Delivery of static content and directory listings is under control of
> the default servlet, as defined in the conf/web.xml file.  By default,
> this has the listings param set to false, to disable ad hoc browsing.  I
> think you could copy the config for the default servlet, change
>  from default to something appropriate for your purpose,
> set the listings param to true, and add a servlet mapping for this
> renamed default to use a  pointing to the directory you
> want to store your public files in.  You would want to put this
> redefined servlet definition and mapping in the WEB-INF/web.xml of the
> webapp that will hold the public directory.
> 
>  - 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-set-up-a-special-folder-to-list-all-files-under-it--tf2903441.html#a8115081
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: How to set up a special folder to list all files under it?

2007-01-01 Thread Martin Gainty
1)yes you need to setup the listings options for your servlet in web.xml as in 
   
   NameOfServlet
   FullPackageNameOfServletClass

listings
true

  
2)make sure you copy your viewable (txt) files to the the webapps/WEBAPPNAME 
(Note the WEB-INF folder is for web.xml, /classes and /lib)
Java
 source
3)ensure the files that you wish to view have an extension that your browser 
will know to associate with text editor(as in .txt extension for vi or wordpad)

(Expanding on previous poster's extremely late nite posting..)

M-
--- 
This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary , confidential and exempt from disclosure. If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.
--- 
Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
destinataire de ce document, nous vous signalons qu'il est strictement interdit 
de le diffuser, de le distribuer ou de le reproduire.
- Original Message - 
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, January 01, 2007 1:48 AM
Subject: RE: How to set up a special folder to list all files under it?


> From: kkus [mailto:[EMAIL PROTECTED] 
> Subject: How to set up a special folder to list all files under it?
> 
> Now I need add a specific folder which will let user to browse
> all files under it without authentication.

I haven't personally tried the following, so take it with a grain of
salt.  Also, others might know an easier way to accomplish what you
want.

Delivery of static content and directory listings is under control of
the default servlet, as defined in the conf/web.xml file.  By default,
this has the listings param set to false, to disable ad hoc browsing.  I
think you could copy the config for the default servlet, change
 from default to something appropriate for your purpose,
set the listings param to true, and add a servlet mapping for this
renamed default to use a  pointing to the directory you
want to store your public files in.  You would want to put this
redefined servlet definition and mapping in the WEB-INF/web.xml of the
webapp that will hold the public directory.

 - 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]



RE: How to set up a special folder to list all files under it?

2006-12-31 Thread Caldarale, Charles R
> From: kkus [mailto:[EMAIL PROTECTED] 
> Subject: How to set up a special folder to list all files under it?
> 
> Now I need add a specific folder which will let user to browse
> all files under it without authentication.

I haven't personally tried the following, so take it with a grain of
salt.  Also, others might know an easier way to accomplish what you
want.

Delivery of static content and directory listings is under control of
the default servlet, as defined in the conf/web.xml file.  By default,
this has the listings param set to false, to disable ad hoc browsing.  I
think you could copy the config for the default servlet, change
 from default to something appropriate for your purpose,
set the listings param to true, and add a servlet mapping for this
renamed default to use a  pointing to the directory you
want to store your public files in.  You would want to put this
redefined servlet definition and mapping in the WEB-INF/web.xml of the
webapp that will hold the public directory.

 - 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]



How to set up a special folder to list all files under it?

2006-12-31 Thread kkus

My current setting is redirect default request (localhost:8080) to my app by
adding a refresh meta in index.html under Root. Now I need add a specific
folder which will let user to browse all files under it without
authentication. This folder can be under my app folder or root folder (I
don't care under which context it is, just make sure user can access and
browse files under it). I am with 5.5.20 service of XP Pro SP2 box. Can
anyone give me some hints? Thanks!
-- 
View this message in context: 
http://www.nabble.com/How-to-set-up-a-special-folder-to-list-all-files-under-it--tf2903441.html#a8112028
Sent from the Tomcat - User mailing list archive at Nabble.com.


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