struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject Re: S2 annotations to limit HTTP methods?
Date Mon, 18 Mar 2013 19:16:19 GMT
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
a list of methods being defined. Is that a better choice?

My use case is that I want S2 AJAX actions that submit data to only be
accessed via POST.

Paul

On Mon, Mar 18, 2013 at 1:25 PM, Lukasz Lenart <lukaszlenart@apache.org>wrote:

> 2013/3/18 Paul Benedict <pbenedict@apache.org>:
> > 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 somebody is asking about
> such a functionality.
>
>
> Regards
> --
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message