cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sonny Sukumar" <ahimsad...@hotmail.com>
Subject Re: NULL request params when POSTing data in 2.1...
Date Thu, 21 Aug 2003 00:24:09 GMT

Hi guys,

I haven't solved my problem of getting null request parameters when trying 
to read request params in an action, so...

Does anybody know how GET vs POST request parameters are handled by Tomcat 
and Cocoon?  To reiterate, it *does* work when I try using GET, but I really 
need to use POST (want to pass some files in addition to data; when I tried 
GET I commented out the file input fields).

I'd appreciate your insights into these two methods of transferring data via 
HTTP and how they're handled by the servlet container and by Cocoon.

I'm running:
Tomcat 4.1.12
Cocoon 2.1 (released version from last week)
RedHat Linux 7.2

Thanks for your help,

Sonny

P.S. This problem only occurs with Cocoon 2.1. I have Cocoon 2.0.4 backed up 
and I tried it again with that and I can always fetch the POSTed request 
parameters just fine in my action.  The code is straightforward:

Request request = ObjectModelHelper.getRequest(objectModel);
String someParam = request.getParameter("param");
...

>From: "Sonny Sukumar" <ahimsadesi@hotmail.com>
>Reply-To: ssukumar@ecologyfund.net
>To: users@cocoon.apache.org
>Subject: Re: NULL request params when POSTing data in 2.1...
>Date: Wed, 20 Aug 2003 13:56:02 -0700
>
>
>
>
>>From: Upayavira <uv@upaya.co.uk>
>>Reply-To: users@cocoon.apache.org
>>To: users@cocoon.apache.org
>>Subject: Re: NULL request params when POSTing data in 2.1...
>>Date: Wed, 20 Aug 2003 20:44:47 +0100
>>
>>Sonny Sukumar wrote:
>>
>>>
>>>Hey guys,
>>>
>>>I upgraded to Cocoon 2.1 and now, when I try to fetch request params from 
>>>the request using 'request.getParameter("param")', it always returns null 
>>>WHEN I use action="post" instead of action="get".
>>
>>I'm a serious beginner with flow, but  I do know that the flow object 
>>model changed between 2.1m3 and rc1. I believe you can now do 
>>request.param to get the same thing as you wanted to do.
>>
>>Does that work?
>
>I don't know anything about flow yet, but my 
>'request.getParameter("param")' statements are actually in an action I 
>wrote that does a number of things after it gets the request parameters.  
>I'm quite baffled as to why POSTing data would stop working in any context 
>though--whether an action or otherwise.
>
>Any other ideas?
>
>>
>>Regards, Upayavira
>>
>>>
>>>At first I thought it might have something to do with my form sending 
>>>mult-part data--that is, sending regular data along with a few files from 
>>>file input fields.  But I commented those out and the problem stil 
>>>persists as long as I'm POSTing the data.
>>>
>>>I changed nothing at all in the code except for upgrading to 2.1.  Does 
>>>anybody have any idea why this would happen?
>>>
>>>Thanks,
>>>
>>>Sonny
>>>
>>>_________________________________________________________________
>>><b>Get MSN 8</b> and enjoy automatic e-mail virus protection.    
>>>http://join.msn.com/?page=features/virus
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>_________________________________________________________________
><b>Help protect your PC:</b> Get a free online virus scan at McAfee.com. 
>http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>

_________________________________________________________________
<b>MSN 8:</b>  Get 6 months for $9.95/month 
http://join.msn.com/?page=dept/dialup


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


Mime
View raw message