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

I'm not sure how to conditionally call useBean, the only choice may be
to load the bean in a scriptlet by hand.

                                                  - 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

Reply via email to