You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Struts Newsgroup (@Basebeans.com)" <st...@basebeans.com> on 2002/08/06 23:55:02 UTC

Restricting actions to GET or POST

Subject: Restricting actions to GET or POST
From: "Kenny MacLeod" <us...@spamgourmet.com>
 ===
Folks,

I feel I may be missing something obvious, but is it possible to configure
struts to only allow a given action mapping to be executed if the request is
of a specified HTTP method, e.g. GET or POST?  As I see it, you can
currently execute an action using either, which is a very bad thing in some
cases.

cheers
kenny




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Restricting actions to GET or POST

Posted by "Craig R. McClanahan" <cr...@apache.org>.
You could do this by customizing ActionServlet (Struts 1.0) or
RequestProcessor (Struts 1.1).  The precise nature of the changes would
depend on what you wanted to have happen if an invalid attempt was made.

Craig


On Tue, 6 Aug 2002, Struts Newsgroup wrote:

> Date: Tue, 6 Aug 2002 14:55:02 -0700
> From: Struts Newsgroup <st...@basebeans.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: Restricting actions to GET or POST
>
> Subject: Restricting actions to GET or POST
> From: "Kenny MacLeod" <us...@spamgourmet.com>
>  ===
> Folks,
>
> I feel I may be missing something obvious, but is it possible to configure
> struts to only allow a given action mapping to be executed if the request is
> of a specified HTTP method, e.g. GET or POST?  As I see it, you can
> currently execute an action using either, which is a very bad thing in some
> cases.
>
> cheers
> kenny
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>