tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asingla4 <>
Subject Re: Unable to access files outside Webapp directory in tomcat
Date Wed, 02 Sep 2009 05:32:58 GMT


I have my Web application installed in C:\Tomcat\webapp\ROOT.
Now, through the Web page of this application, the user uploads an image
which the application saves in C:\files folder using ImageIO class of JAVA. 
Now as soon as the file is uploaded, there should be a download button
enabled for this uploaded image.
If the user hits download, he should be able to download the file he

I'm done with saving the file to C:\files but I don't know how to make it
downloadable when the download button is clicked because the files folder is
outside the webapp directory.

I hope this explains my issue.


Christopher Schultz-2 wrote:
> Are you trying to read a file off the disk using something like
> FileInputStream, or are you trying to access a file from the server
> using a URL from a browser?
> These are very basic questions whose answers will certainly help solve
> your problem.

View this message in context:
Sent from the Tomcat - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message