I am a big fan of Tapestry. One of the only items left on my list of “this bugs me” was the fact that I didn’t have the control over the URLs that I want.
I want URLs to say something, and detest any gobble-de-gook. I think it DOES make a difference.
Howard has promised that this feature will be in 3.1, and it looks like someone has done the heavy lifting for him ;)
Identitytheft911.com has written code that allows them to map URLs, so if you go to:
it gets mapped into the normal Tapestry URL:
There are 2 parts: generating and interpreting.
To generate the urls, I use custom PageLink and ExternalLink components
that utilize a custom ILink implementation that generate the urls using
the following pattern:
The path-to-page-specification is taken from my application specification.
path-to-page-specification = resolution/
page-name = crisisresolution
generated url = /resolution/crisisresolution.htm
Using lower case page names was done at the insistence of my site
To interpret the urls, I have a custom Tapestry servlet that is mapped
to the url pattern *.htm.
In my service() method, if the url query string contains “sp” (i.e.
Tapestry.PARAMETERS_QUERY_PARAMETER_NAME), then I generate a Tapestry
external link, if not I generate a page link.