cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: select/match on POST (not GET)
Date Wed, 17 Apr 2002 14:44:33 GMT
Nick Airey wrote:
> Hello everyone, 
> 
> How can I make my action run on a HTTP POST, but not a GET request?
> 
> eg one of my pipelines is like this:
> 
> <map:match pattern="*/myUrl">
>  <map:act set="action_set">
> 
>   <map:act set="action_set_on_post"/>  <!-- only run on POST -->
> 
>   <map:generate  .... />
>   <map:transform ...  /> 
>   <map:serialize .... />
>  </map:act>
> </map:match>


Sure.  You get the Request object with your Action.  Just check the
getMethod() to see if it is "POST" or "GET" and you can only perform
logic if it is one or the other.


-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message