Some time back, we ran in to a problem between different servers.  The
problem, was that for some reason, the definition of the constants SKIP_BODY
and such mapped to different integers.  While running your code on one
platform, try to print out the values of the common tag constants such as
SKIP_BODY, SKIP_PAGE, EVAL_BODY_INCLUDE and others.  Make sure they are the
same under both platforms.

-AP_

-----Original Message-----
From: DONNIE HALE [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 23, 2002 1:49 PM
To: [EMAIL PROTECTED]
Subject: Anomalies with <sl:present> (possibly AIX JVM issue?)


Folks,

I have an application deployed via a .ear file to WebLogic 6.1sp1 on NT and
on AIX. The following code works fine on NT:

   <sl:present name="hostessDollarInfo" property="tables">
     <sl:iterate name="hostessDollarInfo" property="tables" id="table"
indexId="i" type="tlc.sam.om.policy.domain.HostessDollarBonusTable">
       <TR>
         <TD><sh:text property='<%= "table["+i+"].minimumGuestSales"
%>'/></TD>
         <TD><sh:text property='<%= "table["+i+"].maximumGuestSales"
%>'/></TD>
         <TD><sh:text property='<%= "table["+i+"].minimumHostessDollars"
%>'/></TD>
         <TD><sh:text property='<%=
"table["+i+"].hostessDollarsIncrementValue" %>'/></TD>
         <TD><sh:text property='<%= "table["+i+"].guestSalesIncrementValue"
%>'/></TD>
       </TR>
    </sl:iterate>
  </sl:present>

On AIX, however, the <sl:present> tag returns false, skipping the body. Note
that this is deploying the exact same .ear file (FTP'd from one system to
the other). It happens with Struts 1.0 and 1.0.1.

If I put the following code in the .jsp file just before the above code, the
dump to stdout makes it clear that I can access the bean and the property
method on the bean:

<%
    Object obj = session.getAttribute("hostessDollarInfo");

    if (obj != null)
    {
        System.out.println("Retrieved object of type: " +
obj.getClass().getName());
        if (obj instanceof tlc.sam.om.jsp.policy.HostessDollarBean)
        {
            tlc.sam.om.jsp.policy.HostessDollarBean hdi =
                (tlc.sam.om.jsp.policy.HostessDollarBean) obj;
            tlc.sam.om.policy.domain.HostessDollarBonusTable[] tables =
hdi.getTables();
            System.out.println(tables.length);
        }
    }
    else
    {
        System.out.println("HostessDollarBean attribute couldn't be
retrieved!");
    }
%>

If we remove the <sl:present>, we get a runtime error in the <sl:iterate> to
the effect that the "tables" property doesn't exist. I've rummaged around
the code called by <sl:present>, and the only thing I can come up with is
that there's some JVM difference w/ the IBM JDK for AIX. I'm not ruling out
WebLogic, but in the code path b/w where the <sl:present> tag starts
executing and the property utils methods are called, I don't see anyplace
where WebLogic could intervene.

Has anyone experience this problem, or does anyone have any insight? We're
about at our wit's end here in trying to use the iterate tag for this case.
As far as I know, it's working everywhere else we try it.

Thanks!

Donnie



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to