Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to link external files from web application

 
ravi v kumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i want to place the link in my web application which will download/show the file from location in server.

for this i am using
<a href="file://<filepath>">link</a>
but i am not able to suceed with this. is there anything i need to do?

Thanks in Adavance
Ravi
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi,
file:// means a file on the local users Windows machine. If you want a path on the server, you need to write a servlet to retrieve it.

If this is a real world application, you want to use some sort of code/key rather than the fully qualified file path. For security, it is best the user not know too much about your server.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Jeanne said, since you are dealing with the web, it still is an http request. You link to the file just like you link to an jsp or html page.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic