• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Problem with c:forEach Tag

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I am trying to learn JSP Core tags from a book. I am following the sample code in the book for a cart jsp and on pressing update or remove button, it sends it to a servlet showCart. I will post the code for both of them below. The problem is while I click the first product in the cart and click on update, it does the job. For any other product in the cart, it doesn't update the vaule and show the new amount. Please let me know the mistake.

This is the code for the servlet

Thanks in advance
Vidya
[ September 23, 2008: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rather that repost this, i am having this same exact problem. As i debug in eclipse no matter what row i am on it always grabs the first row of the cart. I assume its because all the qty textfields have the same name, but how would you correct this in the loop?
 
reply
    Bookmark Topic Watch Topic
  • New Topic