struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Cabanes <k...@outermedia.de>
Subject Writing tags dynamically
Date Wed, 20 Sep 2000 19:26:18 GMT
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

Mime
View raw message