| Author |
Problem with redirect URI
|
v venkat
Greenhorn
Joined: Jul 22, 2008
Posts: 7
|
|
I am having problem when redirecting using : String tempurl = "file://\\server1\\directory1"; (example path) resp.sendRedirect(resp.encodeRedirectURL(tempurl)); this works with IE6 but does not work with IE7. Can experts suggest .... am i using wrong path , my target path on windows NT is "\\server1\directory1".
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16479
|
|
|
That isn't a valid URL. Valid URLs don't have backslashes in them. And web applications shouldn't be redirecting to files on the client. Probably that's a security violation of some kind and IE7 has been programmed to not do it.
|
 |
v venkat
Greenhorn
Joined: Jul 22, 2008
Posts: 7
|
|
paul thanks for your reply. Does this mean "file://\\server1\\directory1" is incorrect or we cannot use URI in the send redirect. I am using this to redirect users to open a windows folder and let them paste documents. when I paste the above uri in the explorer directly it opens the folder, but thru the application it does not. can you suggest me what would be the correct format for above file path ? would it be "file:///server1/directory1" ? Is there any other alternative to open a folder on windows using java application without using swing api ?
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6588
|
|
No you cannot redirect to a file / folder on the client. No methods that I am aware of anyway. You can however post a link on a JSP / HTML that will make a user open a particular folder. Something like this <a href="file:\\\d:\" > D </a>
|
SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
 |
|
|
subject: Problem with redirect URI
|
|
|