This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes How to acccess the  external files ( outside the web app plication ) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "How to acccess the  external files ( outside the web app plication ) " Watch "How to acccess the  external files ( outside the web app plication ) " New topic
Author

How to acccess the external files ( outside the web app plication )

YEN CHUN Lai
Greenhorn

Joined: Jun 22, 2008
Posts: 2
How to acccess the external files ( outside the web app plication ) stored in the server ( On wich tomact is Installed) in the Jsp and servlet , i have a website which i hosted thru some hosting providers now i want to access some files which are stored out the tomcat web application folder in the servlet and jsp , as i need to stores some user uploaded files in that external directory
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8843
    
    7

The same way one does with any other resource. Open a file, stream or reader.
Tomcat has a security policy which limits access to files below a certain directory (I believe $TOMCAT_HOME/webapps). You'll have to change that policy in order to access other directories.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
 
subject: How to acccess the external files ( outside the web app plication )
 
Similar Threads
Spring MVC and Sitemesh?
relative vs absolute jsp url issue
Accessing files outside Tomcat
compiling simple servlet
How to acess file outside a War file.