File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sendRedirect() to ROOT in tomcat

 
Kevin Wright
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3226
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic