aspose file tools
The moose likes Struts and the fly likes Pass value....urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply 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");
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Pass value....urgent
 
Similar Threads
Tricky Question
how to reset the field after validation using annotations(Struts 2)
How to convert the for Loop to the equalent JSTL code in JSP
Doubt in EL Implicit Objects: Cookie
jsp bean problem