The ultimate, ultimate goal I am trying to achieve is to be able to debug
(using a test class in JBuilder that instantiates an instance of JRun)
multiple HTTP requests within the same session.

I can instantiate a JRun instance, submit a request, debug that request, but
I cannot debug the redirection to a JSP (as well as subsequent requests),
because JRun chokes on the redirection to a JSP.  This is due to it's
inability to create a pageContext object from the JspFactory.  This
inability only exists when I am creating an instance of JRun from within
JBuilder, not when running JRun in normal application mode.  The same
problem occurs using any other IDE.

If I can create a work around for the <jsp:useBean>, I won't have to hack
through the JSP-generated source code, recompile it, then debug a session.
However, even if I declare the <jsp:useBean> tag inside the scriplets, the
compiler still chokes on 1) declaration of an object the <jsp:useBean> tag
is trying to create, or 2) that same object "may not have been initialized".

If anyone has any solutions for debugging multiple requests within the same
session using any IDE/servlet engine combination, I would love to hear them.



-----Original Message-----
From: Pekowsky Larne [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 15, 1999 12:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Conditional use of <jsp:useBean>


> 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

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