struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Unmesh joshi <unmesh_jo...@hotmail.com>
Subject RE: UriTemplate support in struts
Date Tue, 09 Mar 2010 11:47:09 GMT

While going through the Restful2ActionMapper and RestActionMapper, what I observed is, both
the action mappers support the basic notion of namespace. So a part of the URL is always treated
as the namespace.If I need to support something like UriTemplate, I am just saying which URI
pattern matches to which action. I do not require namespace nor the name in URL explicitly.
ActionMapping and Action configuration are all based on the fact that there will be a name
and namespace which will identify a particular action class to invoke. If I want to say it
wont be action name and namespace but a URI pattern that will be me handle to action class,
it is difficult to support with the current code base. What were the design rationale behind
having namespace and name to be part of the url?
Thanks,Unmesh 



> Date: Tue, 9 Mar 2010 09:47:21 +0530
> Subject: Re: UriTemplate support in struts
> From: shekher.awasthi@gmail.com
> To: dev@struts.apache.org
> 
> Unmesh Struts2 currently maintain a list available of plug-ins
> here is the URL for the same
> 
> http://cwiki.apache.org/S2PLUGINS/home.html
> 
> hope you will get answer of your query from there
> 
> On Tue, Mar 9, 2010 at 9:25 AM, Unmesh joshi <unmesh_joshi@hotmail.com>wrote:
> 
> >
> > Hi,
> > We wanted to expose Restful URLs as explained in (
> > http://uritemplate.codeplex.com/).
> > Currently struts has two action mappers which support Restful urls.
> > RestFul2ActionMapper and Rest plugin's action mapper.
> > The problem with Restful2 action mapper is that it expects parameter names
> > in url
> > e.g. If i want to have Url like
> > www.mysite.com/games/action/1999
> > In RestFul2ActionMapper I will need to give
> > www.mysite.com/games/type/action/year/1999
> > In Rest plugin I cant even have more than one parameters in the URL part
> > because it always expects last part of url to be ID.
> > There is some thing I can do with use of namespaces, but there are
> > limitations.
> >
> > I want to be able to specify url templates like
> > /games/{gameType}/{year} and then match URL like games/action/1999 to
> > action names GamesAction with type parameter set to action and year
> > parameter set to 1999.
> >
> > I am planning to write plugin for struts that will support UriTemplate.
> > Just wanted to check if anyone has done anything like this already?
> >
> > Thanks,Unmesh
> > _________________________________________________________________
> >
> > Green cities and the melting world
> > http://green.in.msn.com/
> >
 		 	   		  
_________________________________________________________________
Fight for the top Test spot
http://sports.in.msn.com/cricket/ 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message