Am facing a problem with the define tag .
In the piece of code below
<bean:Define id="someID"
name="someName"
type="com.custom.somePackage.BeanClassName"
scope="request"
toScope="request"/>
the bean by the name "someName" is not expected to be in the request when the page is displayed for the first time. So this code gives me the error
"Cannot find bean someName in scope request" .
In the page however , i am always using the logic:present tag to access this bean , so as no null pointers can be expected .
According to my understanding this code is simply a declaration for the bean and shud not crib in case the bean is not there in the request scope .
I must be wrong here... but why am not sure ....
Any way am running the code by replacing the above pc with
BeanClassName someID = (BeanClassName)request.getAttribute("someName");
which is working , but it defeats the very purpose of using
Struts.
Any help on why am having this issue and how to strutitize my code ?
[ edited to disable smilies -ds ]
[ April 16, 2004: Message edited by: Dirk Schreckmann ]