JSP

It contains of blogs of jsp.


BodyTag interface of Tag API

BodyTag interface: BodyTag is a sub interface of IterationTag. It adds following method to the tag life cycle: setBodyContent: This method facilitate processing of the tag body by the Tag itself. It has following syntax: In addition to this method, the BodyTag interface defines BodyTag.EVAL_BODY_BUFFERED static final int data member to be used as a […]


Example of BodyTag

Practical example of BodyTag: To demonstrate the example of BodyTag, I have created a custom tag which receives its body contents from the tag processor and change the case of body text. Here is the source code of the Tag and other application compoenents: The CaseChangerTag class: package com.techmentro.learningpad; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.tagext.*; public class […]