<
jsp:useBean id="basket" scope="session" class="BasketBean"/>
Rigth now I'm using this jsp tag to access the basket bean, which may not exist and it correctly creates a new one and places it into the session if necessary
I'm attempting to replace my code with
struts tags so I want to use this
<bean:define id="basketList" name="basket" scope="session" type="BasketBean"/>
But everytime I get an Exception:
Cannot find bean basket in scope session' javax.servlet.ServletException..
This expected behavior since I know it doesn't exist in the session yet. The struts docs say bean:define "Unconditionally creates (or replaces) a bean under the specified identifier." But that's not what's happening here. How can I make the define tag create the the bean when it doesn't already exist?
[ August 04, 2003: Message edited by: Dillon Bussert ]