aspose file tools*
The moose likes Servlets and the fly likes sendRedirect() to ROOT in tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "sendRedirect() to ROOT in tomcat" Watch "sendRedirect() to ROOT in tomcat" New topic
Author

sendRedirect() to ROOT in tomcat

Kevin Wright
Ranch Hand

Joined: Jul 10, 2001
Posts: 38
I am running tomcat 3.2.2
I want to use the HttpServletResponse.sendRedirect method to send somebody from a servlet to a (jsp)file in my ROOT directory. If I fully qualify the path name, I get an error because the servlet looks in the "\servlet" directory first. This is what I get ("/servlet/C:/jakarta-tomcat-3.2.2/...".) How would I fix this?
Thanks,
Kevin
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
sendRedirect() is executed by the browser so the URL given has to be one in a format that is reachable from the public Internet. The browser doesn't know about your C dive.
You would have to map your C:\ drive to some URL in the app (or HTTP) server. Or something like that


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
 
Don't get me started about those stupid light bulbs.
 
subject: sendRedirect() to ROOT in tomcat