tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Moore" <tmo...@blackboard.com>
Subject RE: sendRedirect not working correctly
Date Fri, 04 Oct 2002 20:31:51 GMT
> -----Original Message-----
> From: Jared Reeve [mailto:jaawohl@yahoo.com] 
> Sent: Friday, October 04, 2002 4:20 PM
> To: tomcat-user@jakarta.apache.org
> Subject: sendRedirect not working correctly
> 
> 
> 
> Using Apache Tomcat/4.1.12
> 
> I have my application under the webapps directory.  When I do 
> a sendRedirect to "/servlet/MyServlet" I get an HTTP Status 
> 404 - The requested resource (/servlet/MyServlet) is not 
> available.  The correct path should be "/MyApp/servlet/MyServlet".
> 
> It appears it is not prepending the Root URI (MyApp).

It's not supposed to.

>  Any suggestions

response.sendRedirect(request.getContextPath() + "/servlet/MyServlet");

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message