Thanks for responding. I dumped the value of those constants, and they're identical on 
both platforms.

I've tried one other thing to help determine what's going on. Seeing that the Struts 
code in RequestUtils and PropertyUtils sticks raised exceptions in the request 
context, I added the following code just after the </sl:present> tag closing.

<%
    Throwable t = (Throwable) 
request.getAttribute(org.apache.struts.action.Action.EXCEPTION_KEY);
    if (t != null)
    {
        t.printStackTrace();
    }
%>

Here's the top of the stack trace that was dumped:

java.lang.NoSuchMethodException: Property 'tables' has no getter method
        at 
org.apache.struts.util.PropertyUtils.getSimpleProperty(PropertyUtils.java:713)
        at 
org.apache.struts.util.PropertyUtils.getNestedProperty(PropertyUtils.java:426)
        at org.apache.struts.util.PropertyUtils.getProperty(PropertyUtils.java:453)
        at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:503)
        at org.apache.struts.taglib.logic.PresentTag.condition(PresentTag.java:138)
        at org.apache.struts.taglib.logic.PresentTag.condition(PresentTag.java:99)
        at 
org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(ConditionalTagBase.java:218)
        at 
jsp_servlet._hostessmaint.__modifyhostessdollarprogram._jspService(__modifyhostessdollarprogram.java:1100)

So clearly Struts' attempt to find what we know is an existing method is failing, 
potentially as a result of a JDK bug/oddity. Anyone have any further ideas on how to 
debug and, more importantly, correct this?

Thanks,

Donnie


>>> [EMAIL PROTECTED] 01/23/02 05:10PM >>>
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]>


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

Reply via email to