Subject: Re: html:base misunderstood, broken, or misleading?
From: Eric Rizzo <[EMAIL PROTECTED]>
===
Craig R. McClanahan wrote:
> This sounds like a bug in Jetty.
>
> The Struts code that computes the URL simply calls
> request.getRequestURI(). After a forward, this is supposed to give you
> the request URI of the resource you forwarded to (i.e. the JSP page). It
> looks like Jetty is still returning you the URI of the original request,
> which is a violation of the servlet spec -- for Servlet 2.3, it's in
> Section 8.4:
>
> "The path elements of the request object exposed to
> the target servlet must reflect the path used to obtain
> the RequestDispatcher."
>
> You should forward this note to the Jetty developers -- they are very
> responsive, especially on spec related issues.
Indeed they are. Greg wilkins replied to my inquiry (in which I quoted
your spec reference) with the following:
"I think that the "path elements" refer to getContextPath,
getServletPath and getPathInfo. I believe that getRequestURI
should always return the URI of the original request, unless
wrapped by a user.
However!!! Craig McClanahan know a thing or two about servlets
so I'll go do some checking again!
Jetty used to change the getRequestURI result after a forward, but
we changed it. From memory, I think that a watchdog test is checking for
this.... but I'll check????
Note that this is a simple enough thing to fix IF it is wrong???"
So he's going to do some more research. But do you have any more info
about what the term "path elements" means, exactly, in the spec?
In any case, either Tomcat 3.2 (haven't tested with Tomcat 4 yet) or
Jetty is wrong, or the spec is ambiguous (even worse of a problem).
Eric
--
Eric Rizzo
Software Developer
Jibe, Inc.
http://www.jibeinc.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>