tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Lewis" <james.le...@goodtechnology.com>
Subject RE: Show files on filesystem
Date Wed, 16 Apr 2003 09:16:35 GMT
The second option is certainly the most configurable, plus you will have the benefits of using
all of the buffering input/output stream objects that the API provides.

james

> -----Original Message-----
> From: Andre E. Bar'yudin [mailto:baryudin@pob.huji.ac.il]
> Sent: 16 April 2003 10:06
> To: Tomcat Users List
> Subject: Re: Show files on filesystem
> 
> 
> On Срд, Апр 16, 2003 at 10:35:33 +0200, harm@informatiefabriek.nl wrote:
> > Hi all,
> > 
> > I have Tomcat 4.1 running on Linux.
> > 
> > I have installed Tomcat in /usr/java/jakarta-tomcat/
> > 
> > In my web application I would like to offer my user the 
> possibilty to view 
> > PDF files stored elsewhere on the filesystem.
> > The PDF's are in /var/om/pdfs
> > 
> > In my web application I have a link the user can click. When he 
> does so, a 
> > PDF should be downloaded or displayed in the browser.
> > 
> > How can I achieve this using only Tomcat?
> 
> The simpliest way is to make a link to your PDF files.  To the files
> themselves you may make a hard link, pointing somewhere under the Tomcat
> directory hierarchy.  To link directories, you'll have to use sybmolic
> links, which might require some configuration with newer versions of
> Tomcat. 
> 
> Another, more generic approach would be to use the standard Java IO API
> to read the file from its original location and then just write it out
> to the servlet's output stream.
> 
> Regards,
> 
> Andre.
> 
> -- 
> Andre E. Bar'yudin
> Phone: (972)-54-882-026       ICQ: 48036924
> Home page: http://www.cs.huji.ac.il/~baryudin/
> 
> 
> ---------------------------------------------------------------------
> 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