File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Shopping cart JSP, ActionForm example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Shopping cart JSP, ActionForm example" Watch "Shopping cart JSP, ActionForm example" New topic
Author

Shopping cart JSP, ActionForm example

Warren Bell
Greenhorn

Joined: Oct 03, 2005
Posts: 12
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,


Warren
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4445
    
    5

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.


Junilu - [How to Ask Questions] [How to Answer Questions]
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
you want to use indexed properties for this. if you understand how indexed properties works, you don't need example.


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
 
Don't get me started about those stupid light bulbs.
 
subject: Shopping cart JSP, ActionForm example
 
Similar Threads
Shopping cart application using struts
Cart vs Order
array in session
Enumeration of parameterValues and shopping cart behavior
null value in session variable when showing not null in another page!