You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matjaz Bohoric <ma...@asolsme.com> on 2006/07/02 15:50:40 UTC
reading GET and POST parameters
In cocoon flowscript there is only one method for reading request parameteres - cocoon.request.get
which doesnt distinct between GET and POST parameters.
I would like to get list of POST and GET parameters respectively, NOT union of both.
Is it possible (similart to $_GET and $_POST in PHP)
thanks,
MB
Re: reading GET and POST parameters
Posted by Simone Gianni <s....@thebug.it>.
Hi Matjaz,
currently the coexistence of GET style parameters (usr?param=value) in a
POST request with POSTed parameters is simply wrong.
In a POST request parameters should be in the body of the request, and
not in it's URL as in a GET. That's why the HTTP Servlet API only offers
a getParameter method returning the value of a parameter, and I'm not
even sure that the fact that it returns also URL parameters during a
POST request is documented and/or widely supported.
Cocoon is a servlet, so it simply delegates HTTP request parsing to the
servlet container thru the servlet API, which offers no method to
distinguish between a GET style parameter or a POST style parameter,
since there should be no need to distinguish between them.
So the answer is no, and it's not a cocoon fault, it's not a servlet api
fault, but this should never be written :
<form action="myurl?myparam=myvalue" method="POST">
but should be converted to this :
<form action="myurl" method="POST">
<input type="hidden" name="myparam" value="myvalue"/>
Simone
Matjaz Bohoric wrote:
> In cocoon flowscript there is only one method for reading request
> parameteres - cocoon.request.get
> which doesnt distinct between GET and POST parameters.
>
> I would like to get list of POST and GET parameters respectively, NOT
> union of both.
>
> Is it possible (similart to $_GET and $_POST in PHP)
>
> thanks,
> MB
--
Simone Gianni
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org