>> You can break an if block across two or more scriptlets. For example:
>>
>> <%
>> if (myBooleanExpression) {
>> %>
>> Put JSP or HTML tags here...
>> <%
>> } // ending brace for if
>> %>
>
>True, but his won't work in this case.
>
><jsp:useBean id="foo" class="bar.baz" .../> will turn into something
>like
>
>bar.baz foo = (bar.baz) ...;
>
>This means foo will only be in scope between the two scriptlets. If
>an additional declaration for foo is added outside the scriptlets,
>then the compiler will complain about the variable being defined
>twice.
What about:
<% bar.baz aBeanOrNotABean = null; %>
<% if(!debug) { %>
<jsp:useBean id="foo" class="bar.baz" .../>
<% aBeanOrNotABean = foo; %>
<% } %>
>
> - Larne
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST"
.
>FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
Ciao,
Carsten Heyl
Carsten Heyl [EMAIL PROTECTED]
NADS - Solutions on Nets http://www.nads.de/
NADS GmbH http://www.pixelboxx.de/
Hildebrandtstr. 4E Tel.: +49 211 933 02-90
D-40215 Duesseldorf Fax.: +49 211 933 02-93
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html