Hi,

I posted the following message to the WebSphere new group and haven't had
any response yet.  So I thought I'd try this list.  The problem is related
to accessing multi-valued bean properties in WebSphere.  As the WebSphere
implementation of JSP is based on the 0.91 spec and presumably is based on
the Sun implementation as WebSphere derived from the Java Server Engine, I
thought that someone on this list may have some insights.

My platform is : NT (SP3), JDK1.1.7a, WebSphere 2.0 running out of process
under IIS.  WebSphere does not crash when I run it in process.  However,
for development purposes I find it much more convenient to run it out of
process.

Anyway, the details....

I am trying to create a JSP page which will display a table of items
The JSP page looks like :

<HTML><HEAD>
<TITLE>Device List</TITLE>
</HEAD><BODY>

 <BEAN NAME="deviceBean" TYPE="servlets.DeviceBean" INTROSPECT=NO
CREATE=NO SCOPE=REQUEST></BEAN>

 <REPEAT>
  <INSERT BEAN="deviceBean" PROPERTY=TEST</INSERT>
 </REPEAT>
</BODY></HTML>


I created a small bean, to demonstrate the problem, with a method as
follows :

  public String getTEST(int i) throws ArrayIndexOutOfBoundsException {
    if (i > 10) {
      Trace.debug(this, "About to throw an exception");
      throw new ArrayIndexOutOfBoundsException();
    }
    Trace.debug(this, "TEST = " + i);
    return "TEST STRING! " + i;
  }

The generated java code for the JSP page looks something like :

for (int tsx = 0; i < 2147483647;tsxi++) {
    try {
        if (deviceBean.getTEST(tsx) != null)
            out.print(deviceBean.getTEST(tsx));
        else
            out.print("");
    }
    catch (ArrayOutOfBoundsException ae) {
        break;
    }
}

Which is pretty much as I would expect.  The problem is that the
exception never gets caught.  Instead WAS dumps all the threads to the
console and exits with the follow cry for help : "*** panic:
"..\..\..\..\src\share\java\runtime\executeJava.c", line 234: assertion
failure"

I can workaround this by using the <REPEAT index=i start=0 end=100> and
modifying DeviceBean.getTEST(int i) to check that the index is not out
of bounds.  But this is hardly an elegant solution.

Anyone have any thoughts?

Scott.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to