• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to assign these 3 values to form bean

 
Ranch Hand
Posts: 464
Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a HTML page with 3 text boxes with same name.
Now i want to know how struts Framework handles this case and how i can retrive all the 3 values?

Code snippet of the JSP with the text boxes is as follows.

<html:form action=�someURL�>
<html:text property=�myTextBox� value=�1�>
<html:text property=�myTextBox� value=�2�>
<html:text property=�myTextBox� value=�3�>
<html:submit name=�submit� value=�submit�>
</html:form>

In the normal case we will use following stmt to get above 3 values(in case we are reading values in a servlet).
String myTextBox[]=request.getParameterValues(�myTextBox�);

How form bean maintains these 3 values automatically?

Thanks
Venkatesh S
[ March 09, 2006: Message edited by: Venkatesh Sai ]
 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a way out :-
this
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic