aspose file tools*
The moose likes Struts and the fly likes How do I extract a value of a textfield. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How do I extract a value of a textfield." Watch "How do I extract a value of a textfield." New topic
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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

This doesn't look like JSF to me. Struts maybe? What technology are we dealing with here?


GenRocket - A Test Data Generation Platform
Fritz Largosa
Ranch Hand

Joined: Sep 12, 2005
Posts: 70
yeah, it's struts.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I extract a value of a textfield.
 
Similar Threads
Lock Textfields
regarding awt
Integers and Textfields.
How do i get the value of a TextField component from another page?
Using the variables of same JSP page