******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

******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.