aspose file tools*
The moose likes Servlets and the fly likes provide downloadable files via Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "provide downloadable files via "loader" that are not in webapps/" Watch "provide downloadable files via "loader" that are not in webapps/" New topic
Author

provide downloadable files via "loader" that are not in webapps/

Robert Jaeger
Ranch Hand

Joined: Apr 29, 2002
Posts: 62
Hi!

For really, really restrictive security reasons I have to provide downloadable files (html, gif, applets, ...) that cannot be found in the webapps directory of tomcat (or any other server, even the directory access is restricted).

That means ... when a user requests
http://www.myserver:8080/download?dir=userxy
that the servlet takes all content of the directory C:/downloads/userxy/ and sends it as response to the user. One html-file (index.html) references to all the files (gifs, applets) send with the html file.

How can I do that with a servlet???

It would be great if someone has an idea!

Regards,
Robert.
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Hi Robert,

What do you want the browser to do with the set of files once it's received them? I can think of a few possibilities. It would be useful to know the rationale behind the "really restrictive security" though.

Jules
Robert Jaeger
Ranch Hand

Joined: Apr 29, 2002
Posts: 62
Hi!

The broswser displays an html-page with an applet (the applet requires an XML-file).
The applet and the XML-file must not be directly accessible (not in a server directory reachable by a URL even the access to this directory is restricted).
That means, that the applet and XML-file have to be sent to the user/browser in a special way (by a servlet after checking the user�s rights). How can I do that?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: provide downloadable files via "loader" that are not in webapps/
 
Similar Threads
I am facing some problem in installing the fourm
trouble loading servlet class on Tomcat4.1
Calling "/servlet/MyServlet" from HTML form
Servlets..
WAR file