Meaningless Drivel is fun!*
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
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30377
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    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