tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parsons Technical Services" <parsonstechni...@earthlink.net>
Subject Re: Serving files from Tomcat...sorta
Date Fri, 07 Jan 2005 02:35:15 GMT
1. Set listings to true in the default web.xml.

2. Place a welcome file in any directory that you do not want to display 
listings.

3. Set up a realm per this link:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html

4. Deploy an upload app for each user. Define the matching role in the 
web.xml for the app and name the app the user name.

The user can upload to the directory ../user/list/
This directory will contain only the files the user uploads and as long as 
the user does not upload a file with a name to match the welcome file name 
you will always get the listing when you browse to 
www.yadayada.com/user/list/

You can create a schema that allows some users access to groups of app by 
the roles such as admin that allows you to access all the files.

Doug


----- Original Message ----- 
From: "Will Hartung" <willh@msoft.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Thursday, January 06, 2005 6:41 PM
Subject: Serving files from Tomcat...sorta


> Simply put, we have a system where folks are able to upload files into an
> 'incoming' directory, and download any of their files from any place below
> their home directory.
>
> We want to expose this through the web using HTTPS.
>
> Couple of things I'd like to do here.
>
> a) Authenticate the users against the generic /etc/passwd unix scheme
> (/etc/shadow in our case).
>
> b) I'd like to, if practical, have Tomcat serve the files or, at least, 
> have
> access to the mime-mappings in the conf/web.xml
>
> c) do as little work as possible :-)
>
> In the most basic form, this is a reasonably simple project, scan a
> directory, dump out an "ls -l" of it, let them click on and then serve the
> files.
>
> But Tomcat already has code to serve static files, so I was hoping to
> leverage that ability.
>
> I figured I'd make each "home" directory a "role", and then use a Realm to
> manage the security bits, either hunting down a Unix Realm or writing my
> own, that shouldn't be too hard.
>
> In fact, I'm betting a bunch of this is in Tomcat somewhere (directory
> browsing et al), so I was kind of hoping someone might have some hints on
> stuff I can leverage to pull this seemingly simply thing off.
>
> Any hints?
>
> Thanx!
>
> Regards,
>
> Will Hartung
> (willh@msoft.com)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message