Struts 2 + Rest URLs

2008-08-27 Thread rakeshxp
Hi All, I am migrating from struts 2.0.10 to 2.1.2 ( for need of restful URLs). Could someone help me understand the following ? 1) Is it better to use Annotations or Codebehind for Restful URLs? ( I some how like the annotations more than assuming some standard for resources) 2) I am stuck at

Re: Struts 2 + Rest URLs

2008-08-27 Thread Jeromy Evans
rakeshxp wrote: Hi All, I am migrating from struts 2.0.10 to 2.1.2 ( for need of restful URLs). Could someone help me understand the following ? 1) Is it better to use Annotations or Codebehind for Restful URLs? ( I some how like the annotations more than assuming some standard for resources)

Re: Struts 2 + Rest URLs

2008-08-27 Thread Jeromy Evans
Jeromy Evans wrote: rakeshxp wrote: Hi All, I am migrating from struts 2.0.10 to 2.1.2 ( for need of restful URLs). Could someone help me understand the following ? 1) Is it better to use Annotations or Codebehind for Restful URLs? ( I some how like the annotations more than assuming some

Re: Struts 2 + Rest URLs

2008-08-27 Thread rakeshxp
Excellent. Thanks! So now, I have the following com.struts.example.action.AccountController com.struts.example.action.account.LogoutController When I hit, http://localhost:8080/myapp/account/logout , then I get the following exception No result defined for action

Re: Struts 2 + Rest URLs

2008-08-27 Thread rakeshxp
Jeromy Evans - Blue Sky Minds wrote: This is a approach is fine. The annotations are a feature of CodeBehind in 2.1 (used by CodeBehind to create the configuration) Note that CodeBehind will be replaced by the ConventionPlugin in 2.2ish but the annotations won't need to change

Re: Struts 2 + Rest URLs

2008-08-27 Thread Jeromy Evans
rakeshxp wrote: Jeromy Evans - Blue Sky Minds wrote: This is a approach is fine. The annotations are a feature of CodeBehind in 2.1 (used by CodeBehind to create the configuration) Note that CodeBehind will be replaced by the ConventionPlugin in 2.2ish but the annotations won't need to

Re: Struts 2 + Rest URLs

2008-08-27 Thread Jeromy Evans
I need to sign off, but have a look at the REST showcase included in the apps directory of struts2.1 The location of results is best described here: http://struts.apache.org/2.x/docs/codebehind-plugin.html Codebehind doesn't have much flexibility in the result location. If you use

Re: Struts 2 + Rest URLs

2008-08-27 Thread rakeshxp
I think I am beginning to understand this plugin :) One issue that I am stuck at is that, assuming I have only 1 class com.struts.example.action.AccountController , then http://localhost:8080/myapp/account and http://localhost:8080/myapp/account/1 ( maps to show ) works. But the moment I have