You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eric Suen <er...@hotmail.com> on 2004/04/06 10:17:31 UTC
question about jsp:element and jsp:attribute
Hi
Is the following code correct?
<jsp:element name="fo:table-column">
<jsp:attribute name="column-width">
<jsp:expression>widths[i]</jsp:expression>
</jsp:attribute>
<jsp:scriptlet>
if (bgColors[i] != null) {
</jsp:scriptlet>
<jsp:attribute name="background-color">
<jsp:expression>bgColors[i]</jsp:expression>
</jsp:attribute>
<jsp:scriptlet>
}
</jsp:scriptlet>
</jsp:element>
tomcat can run, but the generated java code is not correct:
out = _jspx_page_context.pushBody();
out.print(widths[i]);
String _jspx_temp0 = ((javax.servlet.jsp.tagext.BodyContent)out).getString();
out = _jspx_page_context.popBody();
out.write("<" + "fo:table-column" + " column-width=\"" + _jspx_temp0 + "\"" + ">");
if (bgColors[i] != null) {
}
out.write("</" + "fo:table-column" + ">");
the second <jsp:attribute/> between <jsp:scriptlet/> was lost.
can I dynamically generate attribute? and in JSP 5.14, jsp:element
only accept jsp:attribute & jsp:body as child element.
I use tomcat 5.0.19
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org