This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Certainly there is. I've never actually done it myself, but it should be simple enough (famous last words)
There are two approaches I can think of 1 - Jakarta Commons EL implementation. This is the implementation of the JSP2.0 package javax.servlet.jsp.el. You can then use those classes in your custom tag. Use the JSP2.0 api as a source for the base classes.
2 - Look at existing source code for the JSTL, and the struts-el implementations. You should be able to leverage off of the JSTL1.0 ExpressionEvaluatorManager class. It is in the package: org.apache.taglibs.standard.lang.support The struts-el tags use that.
Good luck, evnafets
Joined: May 26, 2005
I finally got around to implementing this. Three steps to personal el bliss.
Step 1: Import these two packages from Apache:
Step 2: Each taglib has different attributes that need to ba handled differently (null, not null are the two biggies). Create a method that, for each attribute for which you want to use el, calls ExpressionUtil.evalNotNull() like this.
Step 3: Then inside the doStartTag of your taglib call the method you created above before you do anything else in the method.