Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with redirect URI  RSS feed

 
v venkat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!