Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Shopping cart JSP, ActionForm example

 
Warren Bell
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for an example of a shopping cart form where a user can change the qty ordered. This is a common feature, but I can not find any examples.

It would have one form with one submit button and several rows, each representing an item. Which strut tags would I use and how would the ActionForm look? It would be nice to get a List of line item objects where each object would represent an item with an id and a qty.

Thanks,
 
Junilu Lacar
Bartender
Posts: 7466
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This link looks promising:
http://www.oracle.com/technology/sample_code/tutorials/vsm1.3/files/over.pdf

BTW, there's a bunch of other possibles if you google for "struts shopping cart example". I would look for examples from Ted Husted and/or Matt Raible.
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you want to use indexed properties for this. if you understand how indexed properties works, you don't need example.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic