This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have created a JSP that lists items that are available for purchase. The quantity fields are named using a concatenation of the string "QTY_" and the product number (eg: QTY_03304). The second part of this process is a JSP that is triggered by the 'Add to cart button'. This JSP receives the quantity fields along with their values and adds them to the cart table using the session id as the key, the 'QTY_nnnnn' string, and the field value. My question is on retrieval efficiency. Is it better to store the item's description and price on the cart table, or to parse the 'QTY_nnnnnn' values and execute a call to the data bean to retrieve the product records? (i.e. when building a 'view cart' page) Thanks, Vernon