This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Redirect to a file:// on client side : is it possible ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Redirect to a file:// on client side : is it possible ?" Watch "Redirect to a file:// on client side : is it possible ?" New topic
Author

Redirect to a file:// on client side : is it possible ?

Julien Roubieu
Greenhorn

Joined: Nov 16, 2005
Posts: 10
Hi,

I'm trying to do the following for a few hours, and I don't event know if it is possible... What do you think ? :

Knowing that there is a file at a specific location on the hard drive of the client machine which is accessing the webapp (say C:\dir\image.jpg), is it possible to redirect to a file URL (file:///C:/dir/image.jpg) so that the client will see the file locally ?

When I write a "file://" URL in any browser it will actually find the file, but if I put this same URL in a link href in a web page, the browser will just ignore my click...

Could it be a security issue ? Or am I missing something ?
Thanks for your help !

Julien
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Browsers specifically disallow this this behaviour for security reasons.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Julien Roubieu
Greenhorn

Joined: Nov 16, 2005
Posts: 10
This is understandable.

Thanks for your answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Redirect to a file:// on client side : is it possible ?
 
Similar Threads
Redirecting to an URL from servlet
where to put the servlets
Not able to display images
Problem in viewing uploaded images
Open word doc in folder which is not in weblogic server 10.3 context path and IE 7.0 Browser