Hmm...

How many ways are there to read this part of the spec:
******
public java.lang.StringBuffer getRequestURL()
Reconstructs the ******URL the client used to make the request.******
The returned URL
contains a protocol, server name, port number, and server path, but it does not
include query string parameters.
Because this method returns a StringBuffer, not a string, you can modify
the URL easily, for example, to append query parameters.
This method is useful for creating redirect messages and for reporting errors.
*******

On 4/15/05, Remy Maucherat <[EMAIL PROTECTED]> wrote:
> On 4/15/05, Yaakov Chaikin <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Using Tomcat 5.5.7 (tried Tomcat 5.5.9 with the same results) on Windows XP.
> >
> > When forwarding to a JSP page that is located in
> > /WEB-INF/jsp/success.jsp and calling:
> > <%= request.getRequestURI() %> inside the success.jsp page, the result I 
> > get is:
> > /WEB-INF/jsp/success.jsp
> >
> > I am pretty sure that according to the API, this is the wrong result.
> > It should have returned the URI of the **request**, not the path to
> > the resource.
> >
> > Is this a known bug or there is some weird Tomcat setting that I need
> > to change. I ran this on Tomcat without changing any of the original
> > settings.
> >
> > BTW, the same is true of request.getRequestURL(). It returns (peculiar 
> > enough):
> > http://localhost:8080/WEB-INF/jsp/success.jsp
> 
> This is not a bug, as it's intentional, and hasn't been shown to
> contrdict the spec. The spec seems to hint that this should use the
> path elements (but is very vague). I didn't quite agree with the
> change, but didn't actually care about the issue, so you can try
> asking for clarifications to Sun or on tomcat-dev.
> 
> If you want to change that, hack the request wrapper code a little,
> it's very easy.
> 
> --
> xxxxxxxxxxxxxxxxxxxxxxxxx
> R�my Maucherat
> Developer & Consultant
> JBoss Group (Europe) S�RL
> xxxxxxxxxxxxxxxxxxxxxxxxx
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to