What's the advantage of using Restful2ActionMapper/CompositeActionMapper over something like the UrlRewriteFilter?
http://tuckey.org/urlrewrite/ I like the UrlRewriteFilter because it can alter outgoing URLs to be RESTful-looking as well. Matt Ian Roughley wrote: > > Writing a custom ActionMapper is the way to go - it maps the URL to an > action configuration and back again. > > I would write one for the "http://mysearchsite.com/XYZ+ABC" pattern, and > then use the Restful2ActionMapper for the > "http://myseachsite.com/images/1" pattern. The CompositeActionMapper > will allow you to combine both these together in your application. > > /Ian > > Brian Pontarelli wrote: >> This is very rails like. This is a tough one because of the way that >> Struts handles the URL to find the action mapping. If you want to >> support the Rails ID concept inside your URLs, I would suggest writing >> a custom filter to change the URL as it comes in based on some >> pre-defined criteria. >> >> You could also try implementing a different action mapper (although >> I've never done that, so I'm not certain how difficult it would be). >> >> You might also be able to leverage wild-card mappings to get what you >> need. >> >> -bp >> >> >> rakeshxp wrote: >>> Hello Everyone, >>> >>> I am trying to figure out on how to implement custom URL format in >>> Struts 2. >>> >>> Specifically, I needed URLs like -> http://mysearchsite.com/XYZ+ABC >>> => This should be calling a default >>> Action class and pass XYZ , ABC as parameters >>> >>> -> http://myseachsite.com/images/1 => This should be calling an Image >>> Action >>> class with 1 as a parameter >>> Has anyone achieved the above mentioned requirements before or can >>> help me >>> do so ? >>> thanks in advance >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Custom-URL-in-Struts-2-tf4272524.html#a12164705 Sent from the Struts - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]