Part of the solution here is a custom Dispatcher, contributed to the MasterDispatcher service configuration.
A Dispatcher is provided with the Request and Response, and can decide how and if to response, much like a servlet. The different Dispatchers form a chain-of-command. You can "schedule" your Dispatcher ahead of the default Dispatchers to ensure no conflicts. The hard(er) part is to generate proper links to your pages with this extra data. The path of least resistance is to use the page activation / passivation events built into Tapestry, which give a reasonable, if not fully custom, URL. On 7/13/07, Fabien Le Floc'h <[EMAIL PROTECTED]> wrote:
Hi All, I am new to Tapestry and would like to have a particular mapping for some pages. For example, I would like that a call to /user/MyUserName/viewSomething/withThisParameter maps to a page called ViewSomething, where a user field would be initialized with MyUserName. Now I can easily achieve similar goal using the url /viewSomething/MyUserName/withThisParameter by using onActivate(x,y). But the url does not have the same meaning and is less logical. As a concrete example, try /tag/billgates/microsoft, it is not obvious what this is, but /user/billgates/tag/microsoft is easy to guess. So I would like to do a filter that intercepts the request and if it starts with /user, get the page let's say in userpages packages instead of pages package, and then pass the parameter after user/ and before /pageName to it. It is quite simple to do using regular ServletFilter, how do i do that with Tapestry Pages? Regards, Fabien. PS: note that I don't expect this to be automatically done by T5, but I hope there would be a simple programmatic way to do that.
-- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]