Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to retrieve the values of dynamically created text boxes in jsp

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am dynamically genearting text boxes on jsp. How do I access selected values in my action class when user clicks submit?

Following is my jsp.

<th>Transaction ID</th>
<th>Transaction Status</th>
<th>Unit Price</th>
<th>Enter Price</th>


<c:forEach var="item" items="${plistname}"><tr>
<td> <c ut value="${item.productInterest.buyer}"/></td>
<td> <c ut value="${item.productInterest.transactionid}"/></td>
<td> <c:out value="${item.productInterest.transactionstatus}"/></td>
<td> <c:out value="${}"/></td>
<td> <c:out value="${}"/></td>
<td> <c:out value="${item.product.unitprice}"/></td>
<td> <input type="text" id="price" /></td>

Kindly help me.
Posts: 67425
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have not given your text boxes names. Without names, the values will not be submitted as part of the request.

Once the controls have names, you would fetch their values using the usual mechanisms. The fact they were "dynamically created" as part of the original JSP is moot.
Hot dog! An advertiser loves us THIS much:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic