You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jared Reeve <ja...@yahoo.com> on 2002/10/04 22:19:43 UTC
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). Any suggestions
---------------------------------
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
Re: sendRedirect not working correctly
Posted by Charles Baker <ra...@yahoo.com>.
--- Jared Reeve <ja...@yahoo.com> wrote:
>
> 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). Any suggestions
>
I assume that you are calling sendRedirect() in a
servlet? If so then why not use "MyServlet"? You are
already at "/MyApp/servlet/". Is it a jsp in "/MyApp"?
Then try "servlet/MyApp".
=====
rascharles@yahoo.com
http://www.charleshbaker.com/~chb/
Hacking is a "Good Thing!"
See http://www.tuxedo.org/~esr/faqs/hacker-howto.html
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>