• Post Reply Bookmark Topic Watch Topic
  • New Topic

accessing the server's local files from application server  RSS feed

 
Preetham Chandrasekhar
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Whats the file url one has to provide to access a local file from a j2ee application running on an application server?

I tried the following but nothing seems to be working:

file://localhost/C|abc.txt

file:///C:/abc.txt

is this even possible?

Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on what you mean by 'access'.
If you want to serve it up to a browser, you'll either need to move it to a directory within the JEE application (but not under WEB-INF), or write a servlet that can read it from the local file system and stream it to the browser.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!