You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Malhotra, Amitkumar (Exchange)" <AM...@Bear.com> on 2005/11/26 09:42:42 UTC

nul value in action

Am trying to pass parameters to the action class in the following
manner,

<html:link action=myaction?name=amit> View Details</html:link>

when I try to retrive the same in the action class using 
request.getParameter("name"), it gives me a null value,

 

Is there some thing I am missing here. My application
does not have a form bean , the user clicks on link and
data is retrieved from the database.

Regards,
Amit Malhotra.




Re: nul value in action

Posted by Michael Jouravlev <jm...@gmail.com>.
On 11/26/05, Malhotra, Amitkumar (Exchange) <AM...@bear.com> wrote:
>
>
>
> Am trying to pass parameters to the action class in the following manner,
>
> <html:link action=myaction?name=amit> View Details</html:link>
>
>  when I try to retrive the same in the action class using
>  request.getParameter("name"), it gives me a null value,

Try <html:link action="myaction?name=amit">View Details</html:link>.
Next time before wondering what is wrong with Struts, trace request
being sent to server with something like LiveHTTPHeaders. A lifesaver.

Michael.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: nul value in action

Posted by Laurie Harper <la...@holoweb.net>.
Malhotra, Amitkumar (Exchange) wrote:
> Am trying to pass parameters to the action class in the following
> manner,
> 
> <html:link action=myaction?name=amit> View Details</html:link>
> 
> when I try to retrive the same in the action class using 
> request.getParameter("name"), it gives me a null value,
> 
> Is there some thing I am missing here. My application
> does not have a form bean , the user clicks on link and
> data is retrieved from the database.

What does the generated HTML look like? And what does the 'myaction' 
action mapping in struts-config look like?

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: nul value in action

Posted by Martin Gainty <mg...@hotmail.com>.
Amit-

Have you looked at DynaActionForm
http://www.ajug.org/meetings/download/struts.pdf

Anyone else?

M-
  ----- Original Message ----- 
  From: Malhotra, Amitkumar (Exchange) 
  To: Struts Users Mailing List 
  Sent: Saturday, November 26, 2005 3:42 AM
  Subject: nul value in action


  Am trying to pass parameters to the action class in the following manner,

  <html:link action=myaction?name=amit> View Details</html:link>

  when I try to retrive the same in the action class using 
  request.getParameter("name"), it gives me a null value,

   

  Is there some thing I am missing here. My application
  does not have a form bean , the user clicks on link and
  data is retrieved from the database.

  Regards,
  Amit Malhotra.





------------------------------------------------------------------------------




  ***********************************************************************
  Bear Stearns is not responsible for any recommendation, solicitation, 
  offer or agreement or any information about any transaction, customer 
  account or account activity contained in this communication.
  ***********************************************************************





------------------------------------------------------------------------------


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
  For additional commands, e-mail: user-help@struts.apache.org