Hi everyone,
I have a doubt with the JSP tag libraries.
Supose that this is the fragment of a jsp:
<% String str="dynamic"; %>
<taglib:mine attrib1="a" attrib2="<%=str%>">
// Body of the tag
</taglib:mine>
In this frament there is a piece of Java code that defines a variable
str. In the next line there is the tag 'mine' from the library 'taglib'
with two attributes: 'attrib1' and 'attrib2'.
The value of attrib1 is hardcoded, and there is no problem, but the
value of attrib2 is dynamic and depends on the value of the variable
str.
But unfortunately, inside a tag like this one, Java code is not
interpreted and attrib2 gets the value '<%=str%>' instead of 'dynamic'.
Anybody knows any way for writing the values of the attributes of tag
libraries dynamically?
Thanx in advance!
Jose R. Cabanes
Web Application Developer
www.outermedia.de
|