Name
SimpleTag
Synopsis
The SimpleTag
interface defines the new, easier to
use, tag handler API introduced in JSP 2.0. Tag handlers implementing
this interface are referred to as simple tag
handler (tag handlers based on the older API are referred
to as classic tag handlers). The container
creates a new instance of the class that implements this interface
for each invocation.
A tag handler implementing this interface can do everything a classic
tag handler can do, except that the corresponding custom action
element must not contain scripting elements (i.e., the tag handler
must be declared to have a body content of empty
,
scriptless
, or tagdependent
).
Synopsis
Interface name: |
javax.servlet.jsp.tagext.SimpleTag |
Extends: |
javax.servlet.jsp.tagext.JspTag |
Implemented by: |
Custom action tag handler classes |
Methods
-
public void doTag( ) throws JspException, SkipPageException, java.io.IOException
Performs all processing for the tag handler using the properties and attributes previously set by the setter methods. If the page processing must be terminated after processing of this tag handler (e.g., if the tag handler forwards or redirects to another resource), this method must throw a
SkipPageException
.-
public JspTag getParent( )
Returns the parent tag handler or
null
if there’s no parent.-
public void setJspBody(JspFragment jspBody)
Sets the fragment that represents the custom action element’s body. The container doesn’t call this method if the custom action element body is empty.
-
public ...
Get JavaServer Pages, 3rd 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.