File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Shopping cart JSP, ActionForm example" Watch "Shopping cart JSP, ActionForm example" New topic

Shopping cart JSP, ActionForm example

Warren Bell

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.


Junilu Lacar

Joined: Feb 26, 2001
Posts: 6521

This link looks promising:

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="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: Shopping cart JSP, ActionForm example
jQuery in Action, 3rd edition