See this thread:
The party line seems to be that details of URL formats are properly the concern of the webapp, not Seam. So use a Tomcat plugin or Apache plugin or something to mung your URL into request parameters that work with Seam out of the box.
Actually I found another thread that indicates you can potentially do some of this sort of thing in pages.xml, but the details are tenuous. Sorry I don't have the thread link handy (and I should be working, not Seam hacking, anyway ;-).
Looking through the forums and the blog example I got some ideas:
-For requests pages.xml can be used for view-ids such as article/* and gallery/*. The actions called can then use a FacesContext to get the parameters encoded in the URL through facesContext.getExternalContext().getPathInfo().
-For generated links (s:link, h:outputLink, ...?) I'll have to supply alternatives (extended versions) which support alternative ways of formatting the result, probably through a formatter class.
I haven't tested any of these and actually not written any code using Facelets and Seam yet, but does this sound reasonable? :-) I'll run some tests tomorrow. If it works it might be worthwhile to add extended tags (s:link, ...) which support different URL formatters and actions which parse different types of URLs to the Seam distribution. Please comment!
You're right. I'll probably resort to URL rewriting after having read
and trying to get it to work by myself. I don't like the quite static coupling between URLs and the way they're interpreted from a design point of view, but that's what we've got and rewriting seems to be the most practical solution here.
After having spent some more time on use cases rewriting s:links doesn't make sense anymore here and as far as I can tell now I'll probably just supply a function to convert a request and actions into request/parameter1/parameter2 format.
Now, let me start coding.