Classic tags have a different lifecycle

Simple tags are simple—it’s all about doTag(). But with classic tags, there’s a doStartTag() and a doEndTag(). And that brings up an interesting problem—when and how is the body evaluated? There’s no doBody() method, but there is a doAfterBody() method that’s called after the body is evaluated and before the doEndTag() runs.

image with no caption

Get Head First Servlets and JSP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.