• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Shopping cart JSP, ActionForm example

 
Warren Bell
Greenhorn
Posts: 12
  • 0
  • 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
Pie
Posts: 6529
21
Java Linux Mac Scala Spring
  • 0
  • 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
  • 0
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic