Re: S2 annotations to limit HTTP methods?

2013-03-25 Thread Dian Aditya
Hi, Take a look at http://java.net/projects/s2restplugins, our team has developed struts2 plugin that have annotation similar to Convention plugin's annotation, with the additional property like @Action(name="myaction", method=HttpMethod.GET) Yo

Re: S2 annotations to limit HTTP methods?

2013-03-19 Thread Lukasz Lenart
2013/3/19 Maurizio Cucchiara : > IMHO supporting http request method could be a value added: sometime > you have to define a something.action and a doSomething.action (as > example see fileupload action definition [1]) in order to define an > input action (usually request by a get method) and the f

Re: S2 annotations to limit HTTP methods?

2013-03-19 Thread Maurizio Cucchiara
IMHO supporting http request method could be a value added: sometime you have to define a something.action and a doSomething.action (as example see fileupload action definition [1]) in order to define an input action (usually request by a get method) and the final action submitted by a post request

Re: S2 annotations to limit HTTP methods?

2013-03-18 Thread Lukasz Lenart
2013/3/18 Paul Benedict : > I see that javax.ws.rs has @GET, @POST, etc. annotations that can @Target a > method. Those seem like a good choice, but they are unfortunately part of > the web services package. Too bad they weren't part of the common Servlet > support! However, javax.servlet.annotatio

Re: S2 annotations to limit HTTP methods?

2013-03-18 Thread Paul Benedict
I see that javax.ws.rs has @GET, @POST, etc. annotations that can @Target a method. Those seem like a good choice, but they are unfortunately part of the web services package. Too bad they weren't part of the common Servlet support! However, javax.servlet.annotation has @ServletSecurity that allows

Re: S2 annotations to limit HTTP methods?

2013-03-18 Thread Lukasz Lenart
2013/3/18 Paul Benedict : > Does S2 have annotations, which can be applied to an action method, to > explicitly specify which HTTP methods are allowed? Thus returning a 405 > otherwise? As I can recall, no - but if could describe a more specific case we can add them. It isn't the first time that s

Re: S2 annotations to limit HTTP methods?

2013-03-18 Thread Maurizio Cucchiara
As far as I can remember there is something in the rest plugin, but it would not be difficult to write an interceptor (maybe using rest plugin code as hint). Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921 Linkedin:http://www.linkedin

S2 annotations to limit HTTP methods?

2013-03-18 Thread Paul Benedict
Does S2 have annotations, which can be applied to an action method, to explicitly specify which HTTP methods are allowed? Thus returning a 405 otherwise? Paul