File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Can we redirect a servlet to file server instead a jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Can we redirect a servlet to file server instead a jsp" Watch "Can we redirect a servlet to file server instead a jsp" New topic
Author

Can we redirect a servlet to file server instead a jsp

desi sur
Greenhorn

Joined: Jun 03, 2007
Posts: 10
Normally we redirect to a servlet or a jsp can we redirect to a file share i.e when we do

request.sendredirect("file:\\direcotry_a\directory_b\directory_c") ?

i tried the above but it is not working do we need to use any other format ?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

sendRedirect does nothing more than send a 303 header to the browser along with a location header containing the URL that the browser should call.

The URL would have to be something that the browser can reach.
I've only ever used it for HTTP calls.
I'm not sure if you can make requests to UNC resources.

f:\\... is the syntax you would use to request a local file on a Windows box.
I don't see how this would work.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
wood burning stoves
 
subject: Can we redirect a servlet to file server instead a jsp
 
Similar Threads
Calling servlet from JSP
Access Servlet InitParameters in JSP
Servlet Redirect
Request Dispatching
welcome file in web.xml