Use this syntax in your JSP:

    <yourlib:yourtag name="<%= (new Date()).toString() %>" />

then use <rtexprvalue> in your taglib attribute definition, like so:

    <attribute><name>name</name><rtexprvalue>true</rtexprvalue></attribute>

Dave

----- Original Message -----
From: Tim Fox <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 25, 2000 6:17 AM
Subject: Dynamic attributes to custom tags


Is there any way, using taglibs to get dynamic attributes passed into
the tag code, from my understanding it seems that the attributes get
passed as literals.

For example:

<mylib:mytag attribute1="(new Date()).toString()" />

In my setter method for attribute1 in my tag code the string "(new
Date()).toString()" is passed in, rather than the evaluation of the
expression (new Date()).toString().

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to