public abstract class ComponentTagSupport extends StrutsBodyTagSupport
| Constructor and Description |
|---|
ComponentTagSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearTagStateForTagPoolingServers()
Provide a mechanism to clear tag state, to handle servlet container JSP tag pooling
behaviour with some servers, such as Glassfish.
|
int |
doEndTag() |
int |
doStartTag() |
abstract Component |
getBean(ValueStack stack,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
Component |
getComponent() |
protected void |
populateParams()
Define method to populate component state based on the Tag parameters.
|
protected void |
populatePerformClearTagStateForTagPoolingServersParam()
Specialized method to populate the performClearTagStateForTagPoolingServers state of the Component to match the value set in the Tag.
|
findString, findValue, findValue, getBody, getPerformClearTagStateForTagPoolingServers, getStack, release, setPerformClearTagStateForTagPoolingServers, toStringdoAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContentfindAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueprotected Component component
public abstract Component getBean(ValueStack stack, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
public int doEndTag()
throws javax.servlet.jsp.JspException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class StrutsBodyTagSupportjavax.servlet.jsp.JspExceptionpublic int doStartTag()
throws javax.servlet.jsp.JspException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspExceptionprotected void populateParams()
Descendants should override this method for custom behaviour, but should always call the ancestor method when doing so.
protected void populatePerformClearTagStateForTagPoolingServersParam()
Generally only unit tests would call this method directly, to avoid calling the whole populateParams() chain again after doStartTag() has been called. Doing that can break tag / component state behaviour, but unit tests still need a way to set the performClearTagStateForTagPoolingServers state for the component (which only comes into being after doStartTag() is called).
public Component getComponent()
protected void clearTagStateForTagPoolingServers()
StrutsBodyTagSupport
Usage: Override this method in descendant classes to clear any state that might cause issues should the
servlet container re-use a cached instance of the tag object. If the descendant class does not
declare any new field members then it should not be strictly necessary to call this method there.
Typically that means calling the ancestor's clearTagStateForTagPoolingServers()
method first, then resetting instance variables at the current level to their default state.
Note: If the descendant overrides StrutsBodyTagSupport.doEndTag(), and does not call
super.doEndTag(), then the descendant should call this method in the descendant doEndTag() method
to ensure consistent clearing of tag state.
clearTagStateForTagPoolingServers in class StrutsBodyTagSupportCopyright © 2000–2024 Apache Software Foundation. All rights reserved.