This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes Pass value....urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Pass value....urgent" Watch "Pass value....urgent" New topic
Author

Pass value....urgent

meena latha
Ranch Hand

Joined: Jan 24, 2005
Posts: 219
hi all.

I need this very urgently.
I am not able to get the value of textbox from the jsp page to my action class.
What are the things that i should look into.
request.getAttribute("Textboxname") is returning null value.

Thanks in advance
Atchuta Penmatsa
Greenhorn

Joined: Feb 15, 2002
Posts: 6
Hi,

You have to use getParameter() method when retrieving values from a JSP.

example:
request.getParameter("Textboxname");

-Atchuta
meena latha
Ranch Hand

Joined: Jan 24, 2005
Posts: 219
i tried that also....no still not working
Atchuta Penmatsa
Greenhorn

Joined: Feb 15, 2002
Posts: 6
Not sure, how you are sending data to the Action class. Try to post some sample code.
subu ananthram
Ranch Hand

Joined: May 16, 2004
Posts: 102
form.get("textboxName")
typecast it to string or whatever
will get you the data you want from your JSP
Hope that helps..
Raghavendra nandavar
Ranch Hand

Joined: Jun 26, 2005
Posts: 231
Hi,
actually, if u are using a struts component, u can get the value from the form , if u r using a html component, then u can get the value from the request - request.getParameter("componentName");
 
 
subject: Pass value....urgent