JSP 2.0

It's coming... I just downloaded both the spec and the preview off of Sun's website and took a look around. There's even more madness in most parts of the spec, but this made me a little happier:

public interface SimpleTag
Interface for defining "simple tag handlers."

Instead of supporting doStartTag() and doEndTag(), the SimpleTag interface provides a simple doTag() method, which is called once and only once for any given tag invocation. All tag logic, iteration, body evaluations, etc. are to be performed in this single method. Thus, simple tag handlers have the equivalent power of IterationTag, but with a much simpler lifecycle and interface.

To support body content, the setJspBody() and getJspBody() methods are provided. The container invokes the setJspBody() method with a JspFragment object encapsulating the body of the tag. The tag handler implementation can call getJspBody().invoke() to evaluate the body as many times as it needs.

Hey, if I have to use the freakin' things, it would be nice if they were a little easier to develop. This method of develop tags seems very similoar to ATG's droplets. This class is used in conjunction with the new JspFragment class, however, which bewilders me. (Offtopic: more Java name standard confusion... Url was changed to be URL but JSP is fine as Jsp...)

-Russ

< Previous         Next >