| Author |
How do I extract a value of a textfield.
|
Fritz Largosa
Ranch Hand
Joined: Sep 12, 2005
Posts: 70
|
|
I want to output the value of the textfield below. --------------------textfield code------------------------- <html:text styleClass="textfield" name = "user" property="username" value = "original" style="width:200px" styleId="usernameTextEdit"/> ------------extraction code which does not work- help!---------- out.println("value = " + request.getParameter("user")); --------problem---------- I do not know how to extract the value off the textfield. [ December 08, 2005: Message edited by: Fritz Largosa ]
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
|
This doesn't look like JSF to me. Struts maybe? What technology are we dealing with here?
|
 |
Fritz Largosa
Ranch Hand
Joined: Sep 12, 2005
Posts: 70
|
|
|
yeah, it's struts.
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
|
Well, this is the JSF forum. Moving to the Struts forum...
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
|
In this case, since you have specified "original" as the value attribute in your html:text tag, the value of this field will always display as "original". If you remove this value attribute, the value of the field will be ((User)request.getAttribute("user")).getUserName(). This is assuming that "User" is the class name of the bean referred to as "user" as the name attribute of the html:text tag.
|
Merrill
Consultant, Sima Solutions
|
 |
 |
|
|
subject: How do I extract a value of a textfield.
|
|
|