cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Wang <Li.W...@first-franklin.com>
Subject RE: Custom Action
Date Tue, 22 Apr 2003 16:54:13 GMT
Hi Bruno,

Thank you very much for your help. It works. :-)

Li

-----Original Message-----
From: Bruno Dumon [mailto:bruno@outerthought.org]
Sent: Tuesday, April 22, 2003 12:50 AM
To: cocoon-users@xml.apache.org
Subject: Re: Custom Action


On Mon, 2003-04-21 at 22:15, Li Wang wrote:
> Hi,
> 
> I am trying to write a custom action to get data from user input (HTML
input
> fields) and perform some business logic. For some reasons, the request
> parameters are always null in my custom action (e.g. username and password
> are null). 
> 
> I was wondering if anyone knows what went wrong here. I am new to Cocoon2
> world, so any help would be appreciated. BTW, I am using Cocoon 2.04 and
> tomcat 4.1.24.
> 
> Thanks,
> 
> Li 
>  
> 
> LoginAction.java
> ======================
> 
>   Request request = ObjectModelHelper.getRequest(objectModel);     
>   String username = (String)request.getAttribute("username");
>   logger.debug("username=" + username);	
> 
>   String password = (String)request.getAttribute("password");
>   logger.debug("password=" + password); 

Try request.getParameter("username") instead of getAttribute.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


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


---------------------------------------------------------------------
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