Consider a site with the following url rewriting /mysite/cars/view - view all cars /mysite/cars/bmw/view - set the Car environmental as "bmw" then invoke /mysite/cars/view /mysite/cars/porsche/view - set the Car environmental as "porsche" then invoke /mysite/cars/view /mysite/facebook/cars/view - put "facebook" into the Mode environmental (different css) then invoke /mysite/cars/view /mysite/facebook/cars/bmw/view - put "facebook" into the Mode environmental and "bmw" into the Car environmental then invoke /mysite/cars/view
There's two approaches: 1. Cloak the Request in a filter, all processes further down the request processing pipeline will see a cloaked Request when the @Inject it 2. Only cloak the request when calculating ComponentEventRequestParameters and PageRenderRequestParameters (decodeComponentEventRequest() and decodePageRenderRequest()) In option 1: - The URL displayed in the user's browser will be different to the @Injected request's getPath() - I can only assume that the HTTPServletRequest will not be cloaked so @Inject HTTPServletRequest and @Inject Request will have conflicting path values - If I wanted to calculate the relative location of "/mysite/" based on Request.getPath(). I would get the calculation wrong in some cases since the cloaked Request.getPath() is exactly the same for all URLs (mentioned above) In option 2: - The URL displayed in the user's browser is the same as Request.getPath() - Request and HTTPServletRequest are not in conflict over the value of path - I will be able to accurately calculate the relative location of "/mysite/" in each URL since the URL is not cloaked. I'm not sure that this URL calculation is a problem but I don't see a need to cloak the @Inject'ed Request. For this reason, I lean towards option 2. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-dynamic-sub-directory-to-URL-tp5714532p5714591.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org