******Need help on shopping cart javaBean code******* - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

******Need help on shopping cart javaBean code*******

Compiling the following code outputs the error that the javaBean curItem does not exist. However, my other code depends on a javaBean curItem. I don't understand why I cannot update the quantity property of a specific object (curItem) in the arrayList lineitems if I am declaring curItem to be an object inside lineitems using the var attribute. Please clarify and perhaps help update the quantity property in an object in lineitems using a curItem javabean. Thanks!

[code]<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="wxshop" uri="http://www.wrox.com/begjsp/eshop-functions-taglib" %>

<%@ page session="true" %>







Endivian.com Shopping Cart











${wxshop:clearList(lineitems)}








+
++
++
++
++
++
++
++
++
++
++
++
+${wxshop:addList(lineitems, tmpitem)}+
++
++
++

++
++
++
++
+
Wrox JSTL Web Store
+
+

+
++

++
++
++
++
++
++
+

























Your Shopping Cart
QuantityItemPriceExtendedAdd
${curItem.quantity}${curItem.desc}









Add 1

Total:





Clear the cart


Return to Shopping

[/code]

[code]Error(34,37): This bean name does not exist.
[/code]
Sign In or Register to comment.