Quoting James Norman <[EMAIL PROTECTED]>:

> I'm in the process of porting a web application from the
> Jetspeed/Turbine framework over to struts and I ran into a problem
> someone may be able to help me with.
> 
> When I have a Jsp that is included by a tile, the
> httpServletRequest.getRequestURI() returns the location of the Jsp that
> the tiles included, not the resource that the browser requested.  As far
> as I can tell, it is the Tiles Controller that is changing this from the
> original set by the container.  This is causing some problems in the
> application I have because the requestURI becomes something like
> /WEB-INF/templates/body.jsp, which isn't terribly useful.  I have found
> a few emails regarding this in the archives, but no solutions.  Is there
> a configuration which will tell the controller not to mess with the
> requestURI?  Any insight would be appreciated.
> 

You will see this sort of behavior in any servlet-based application that uses
RequestDispatcher.incude() -- as Tiles does -- to assemble the various
subcomponents of the page together.  The servlet API requires that the request
URI (as well as the other path components like the servlet path) be adjusted in
such scenarios to point at the included resource.

The request URI of the original request is still available to the included
resource, however -- it's stored by the container in a request attribute under
the key "javax.servlet.include.request_uri", along with the other path
components under similarly named keys.  See Section 8.3.1 of the Servlet Spec
for details.

> Thanks,
> James Norman
> 

Craig


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

Reply via email to