I have the following code in a custom taglib. If I put the hex values
of the colors in the context-param area of the web.xml file, how do you
call them?
<context-param>
<param-name>color1</param-name>
<param-value>#EEEEFF</param-value>
</context-param>
<context-param>
<param-name>color2</param-name>
<param-value>#CCCCFF</param-value>
</context-param>
...
public int doEndTag() throws JspException {
Boolean alternate = (Boolean)
ExpressionEvaluatorManager.evaluate("alternate", alternateEL,
Boolean.class, this, pageContext);
if (alternate.booleanValue()) {
color = "#EEEEFF";
} else {
color = "#CCCCFF";
}
try {
JspWriter out = pageContext.getOut();
out.write(color);
} catch (IOException e) {
e.printStackTrace();
}
return EVAL_PAGE;
}
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com