You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Raquepo <rr...@primeorion.com> on 2003/08/14 08:11:33 UTC

bean 'xxxx' already defined in Orion

how can make my app work in orion when i need a variable in to be defined using iterate.
here's my JSP.
         <logic:iterate id="policyinfo" offset="offsetA" length="length" name="person" property="policyInfo">
          <!--
           <bean:define id="policynum" name="policyinfo" property="policynum"/>
          -->
          <tr bgcolor="#D3D9E2" class="tablecontentdata"> 
            <td width="150">&nbsp;<bean:write name="policyinfo" property="product"/></td>
            <td width="52">&nbsp;<bean:write name="policyinfo" property="policynum"/></td>
            <td width="58">&nbsp;<bean:write name="policyinfo" property="producttype"/></td>
            <td width="79">&nbsp;<bean:write name="policyinfo" property="inceptiontext"/></td>
            <td width="81">&nbsp;<bean:write name="policyinfo" property="expirytext"/></td>
            <td width="92">&nbsp;<bean:write name="policyinfo" property="agent"/></td>
            <td width="73">&nbsp;<bean:write name="policyinfo" property="referror"/></td>
            <td width="61">&nbsp;<bean:write name="policyinfo" property="claims"/></td>
            <td width="108">&nbsp;<bean:write name="policyinfo" property="paymentstatus"/></td>
            <td width="107" align="right">&nbsp;<bean:write name="policyinfo" property="premiumvalue"/>&nbsp;</td>
          </tr>
         </logic:iterate>

   <logic:notPresent name="policynum">
     <bean:define id="policynum" name="NULL"/>
   </logic:notPresent>

i need to get the last policynum on my iterate because i would use it in a link. i put the logic:notPresent tag to check that just in case there were no policy i would need to create a NULL value policynum to that i will not get an error if i use policynum in my link.

the error i am having is bean 'policynum' already defined. so i tried removing it. my app work only if it will enter the iterate tag because policynum will have a value but form some instance that there is no record to iterate to i will have a bean undefined error. How can do this in Orion, the code above works on tomcat,resin and Sun ONE.

thanks a lot...