This  is because your expression is quoted, it should work if you write:
<mylib:mytag attribute1=(new Date()).toString() />

Veronique

Tim Fox a �crit :

> 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().
>
> Can anyone shed any light on whether this is possible with jsp?
>
> (In theory there seems no reason why this is impossible, since the jsp
> compiler could insert a few lines in the generated class for the jsp
> page, like:
>
> String tmp = (new Date()).toString();
> ...
> mytagobj.setAttribute1(tmp);
>
> )
>
> --
> Tim Fox (��o)
>
> Hyperlink plc
> http://hyperlink.com
>
> email: [EMAIL PROTECTED]
> phone: +44 (0) 207 240 8121
>
> ===========================================================================
> 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

===========================================================================
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