Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Servlets and the fly likes Problem with redirect URI Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Problem with redirect URI" Watch "Problem with redirect URI" New topic
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
    
    2

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
    
    1

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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Problem with redirect URI
 
Similar Threads
XSL Include validation in Rational Application Developer 6.0
How to access Remote EJB's ?
Configuring server to access another server
package problem...
The transaction are coming Doubled in the servers