This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes how to link external files from web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to link external files from web application" Watch "how to link external files from web application" New topic
Author

how to link external files from web application

ravi v kumar
Ranch Hand

Joined: Dec 14, 2004
Posts: 56
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

Joined: May 26, 2003
Posts: 32609
    
215

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.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15385
    
    6
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to link external files from web application
 
It's not a secret anymore!