cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Gianni <s.gia...@thebug.it>
Subject Re: reading GET and POST parameters
Date Mon, 03 Jul 2006 04:17:29 GMT
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


Mime
View raw message