struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <>
Subject Re: define tag
Date Fri, 02 Feb 2001 20:45:37 GMT
Here's a sample JSP that may help answer your questions. 

<bean:define id="cool" name="guava"/>
<P><logic:notExist name="cool">Ooops ... </logic:notExist></P>
<P><bean:write name="cool" property="name"></P>

You''ll find that the bean tags, like HTML, are very forgiving.

One nice thing about working with JSP is that it very easy to try
things like this, to see how things work.

*********** REPLY SEPARATOR  ***********

On 2/2/2001 at 11:46 AM John Hunt wrote:

If we use struts-bean:define tag and if the variable
is not found, does it raise exception. If yes how can
I catch it and handle it.
Normally if A is in Sesion scope and a property B
then we would do 
<bean:define id="m" name="A" scope="session"
type="typeA" />
<bean:define id="B" name="m" scope="page" type="typeB"

Now if for some reason we cant find A in the session
or say A is null, we cant put a series of if
conditions in the jsp. How are we supposed to handle
such scenarios

Get personalized email addresses from Yahoo! Mail - only $35 
a year!

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.

View raw message