Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 25AB0F081 for ; Mon, 25 Mar 2013 20:16:57 +0000 (UTC) Received: (qmail 79199 invoked by uid 500); 25 Mar 2013 20:16:54 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 79102 invoked by uid 500); 25 Mar 2013 20:16:54 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 79087 invoked by uid 99); 25 Mar 2013 20:16:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 20:16:54 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.83.54] (HELO mail-ee0-f54.google.com) (74.125.83.54) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 20:16:50 +0000 Received: by mail-ee0-f54.google.com with SMTP id c41so3513663eek.13 for ; Mon, 25 Mar 2013 13:16:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:x-gm-message-state; bh=zoKbrHjSyzQXfogB/IS0Mktu9vx67pjPqEKNrbSiY0w=; b=Zj7FP4Dx0ajVZNyjXnWdOSuX2rfjVsRFsggdeGeZKX/4wRXTST4nt/k7pL7juQM44g 6OL3fiPPP+MLm/rkIlnxjkZorVUV2G3zu7H+xL9eAOFA+dCGG5cGS8YbAM1f5TT71+mk 2UAwdTzwCqKr3Pg35yQbNKMtgfmGBiIk5/ezcRjLpP0nv5IDZXebgp6YWxvxAQH2p9+d wFK99qZ+lKQUWam/a09tb2JYDR5QQ0XfXvzyZqXwi7S/BtsGboeEdEESKFD7tBwEWI73 +k7iVX+Bgcx3uLeMNxMQxAbTLv1/sWYEj3dFYY+FwGmjtU7qrE4sfJyaRlpGkPhfMEAS CaKw== MIME-Version: 1.0 X-Received: by 10.15.22.76 with SMTP id e52mr29041130eeu.7.1364242587997; Mon, 25 Mar 2013 13:16:27 -0700 (PDT) Received: by 10.223.145.142 with HTTP; Mon, 25 Mar 2013 13:16:27 -0700 (PDT) In-Reply-To: References: Date: Tue, 26 Mar 2013 03:16:27 +0700 Message-ID: Subject: Re: S2 annotations to limit HTTP methods? From: Dian Aditya To: Struts Users Mailing List Content-Type: multipart/alternative; boundary=089e01681d16d8956e04d8c57a39 X-Gm-Message-State: ALoCoQlkFbqP4inwwPqaqV/9GbYhRQYf7W9F29oa501HHiGqkmd+G2hpUyyJn8yNz31Ew9ITQREd X-Virus-Checked: Checked by ClamAV on apache.org --089e01681d16d8956e04d8c57a39 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=3D"myaction", method=3DHttpMethod.GET= ) You only need to put @Action on the method to specify wich http methods will be handled by annotated method On Tue, Mar 19, 2013 at 2:16 AM, Paul Benedict wrote= : > 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 allo= ws > 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 >wrote: > > > 2013/3/18 Paul Benedict : > > > Does S2 have annotations, which can be applied to an action method, t= o > > > explicitly specify which HTTP methods are allowed? Thus returning a 4= 05 > > > 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 > > -- > > =C5=81ukasz > > + 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 > > > > > --=20 Dian Wahyu Aditya Meruvian --089e01681d16d8956e04d8c57a39--