You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by joe user <pa...@yahoo.com> on 2003/05/30 05:56:35 UTC

response.sendRedirect() and the servlet path?

Hi, if I have a context path such as /mycontext and I
use response.sendRedirect("/foo.jsp"), the container
should translate that into a full url such as
http://myserver/mycontext/foo.jsp, instead of
http://myserver/foo.jsp.  However, it seems that this
is not happening.  Am I doing something wrong, or is
there a bug, or ???

Thanks for any help on this.


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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


Re: response.sendRedirect() and the servlet path?

Posted by Bill Barker <wb...@wilshire.com>.
My reading of section 5.3 of the servlet-spec (version=2.3), says that you
are wrong.  Paths to sendRedirect are normal URL patterns, and are *not*
based on the calling Context.

"joe user" <pa...@yahoo.com> wrote in message
news:20030530035635.56375.qmail@web20418.mail.yahoo.com...
> Hi, if I have a context path such as /mycontext and I
> use response.sendRedirect("/foo.jsp"), the container
> should translate that into a full url such as
> http://myserver/mycontext/foo.jsp, instead of
> http://myserver/foo.jsp.  However, it seems that this
> is not happening.  Am I doing something wrong, or is
> there a bug, or ???
>
> Thanks for any help on this.
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com




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