HI Marc!
Each INPUT TYPE=CHECKBOX tag must be associated with a JSP generated NAME (which
can be the item code).
request.getParameterNames() returns an Enumeration which can then be parsed to
check which items were selected (with value=getParameter(String name))
Best wishes
Christian
Marc Krisjanous <[EMAIL PROTECTED]> on 07/04/2000 03:35:53
Please respond to Marc Krisjanous <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Christian FEARD/LOGIX/GROUPE_OPEN)
Subject: Shopping Carts in JSP and Websphere - HELP! - Additional
Sorry people!
I left one requirement out - The amount of check boxes available is
unlimited (so is the remove Buttons) so I will need to parse through all
check boxes and buttons on the form to see what check boxes where checked
(true)and what Remove button was clicked. Can this be done??
Marc
Hi all,
does anyone have some sample code or URL links to creating a shopping cart
using JSP pages and Servlets residing on WebSphere?
This is what I would like to do:
1.have an add shopping cart jsp page - users select multiple checkboxes
(denoting items for order) then click on the add button located on the JSP
page.
2.The add button calls a Servlet residing on Websphere. The Servlet parses
through the add shopping cart JSP page and finds all checkboxes selected.
Then creates a shopping cart bean (residing on WebSphere) and adds the items
selected to the users shopping cart bean. The Servlet adds the shopping
cart bean to the users session object.
3.The Servlet then calls the Shopping cart total JSP page. the JSP page
contains a table listing all items selected (gets this from the shopping
cart bean stored in the users session object). For each item displayed a
Remove button will be associated with the item. if the user clicks on one
of the remove buttons then the page is submitted and the Servlet updates the
shopping cart bean then redisplays the shopping cart JSP page.
I have a reasonable idea of how to create the functionality except for the
remove buttons and check box searching. Each remove button will be created
by the Servlet but hows does the processing Servlet know what remove button
has been selected to remove the item and what check box(s) have been
selected.
Thanks in advance
Marc
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets