• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
YEN CHUN Lai
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 9266
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic