I found a thread that helped me :



I wrote :

<xsp:logic>
String id = (String)<xsp:expr><xsp-session:get-attribute name="ID" /></xsp:expr>;
String modifid = UtilsFunction.getInstance().generateID(id, System.currentTimeMillis());
<xsp:attribute name="id"><xsp:expr>modifid</xsp:expr></xsp:attribute>
</xsp:logic>



instead of :


> <xsp:attribute name="id">
> <xsp:logic>String id = (String)<xsp:expr><xsp-session:get-attribute name="ID" /></xsp:expr>;String modifid =
> UtilsFunction.getInstance().generateID(id, System.currentTimeMillis());</xsp:logic>
> <xsp:expr>modifid</xsp:expr>
> </xsp:attribute>


The xsp:logic should contain the xsp:attribute.

Thanks.

At 08:48 29/09/2003 -0400, you wrote:
Lionel Crine wrote:
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp";
xmlns:xsp-cookie="http://apache.org/xsp/cookie/2.0";
xmlns:xsp-request="http://apache.org/xsp/request/2.0";
xmlns:xsp-session="http://apache.org/xsp/session/2.0";
xmlns:util="http://apache.org/xsp/util/2.0"; create-session="false">
  <xsp:structure>
    <xsp:include>com._4d.utils.UtilsFunction</xsp:include>
  </xsp:structure>
  <modification>
    <xsp:attribute name="id">
<xsp:logic>String id = (String)<xsp:expr><xsp-session:get-attribute name="ID" /></xsp:expr>;String modifid =
UtilsFunction.getInstance().generateID(id,
System.currentTimeMillis());</xsp:logic>
<xsp:expr>modifid</xsp:expr>
</xsp:attribute>
    <modificationadm>
      <modificationnum>
          <xsp:expr><xsp-request:get-parameter name="ref" /></xsp:expr>
      </modificationnum>
      <modificationdesc>
        <xsp:expr>
          <xsp-request:get-parameter name="description" />
        </xsp:expr>
      </modificationdesc>
      <xsp:element name="status">
        <xsp:attribute name="status">
          <xsp:expr>
            <util:get-sitemap-parameter name="status" />
          </xsp:expr>
        </xsp:attribute>
      </xsp:element>
      <date />
    </modificationadm>
    <modificationbody />
  </modification>
</xsp:page>
I have this error message : "modifid cannot be resolved" --> Why ?

Because attributes have to be set up before the start of the element they are attached to. Look at the java file your xsp is converted to under your servlet containers work directory - it'll be more obvious.
I made a change above that should work - you could clean it up but that's the basic idea.


Geoff



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

Lionel CRINE Ing�nieur Syst�mes documentaires Soci�t� : 4DConcept 22 rue Etienne de Jouy 78353 JOUY EN JOSAS Tel : 01.34.58.70.70 Fax : 01.39.58.70.70


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



Reply via email to