Class ComponentTagSupport
- All Implemented Interfaces:
- jakarta.servlet.jsp.tagext.BodyTag,- jakarta.servlet.jsp.tagext.IterationTag,- jakarta.servlet.jsp.tagext.JspTag,- jakarta.servlet.jsp.tagext.Tag,- Serializable
- Direct Known Subclasses:
- AbstractUITag,- ContextBeanTag,- ElseIfTag,- ElseTag,- I18nTag,- IfTag,- IncludeTag,- OptGroupTag,- ParamTag,- PropertyTag,- PushTag
- See Also:
- 
Field SummaryFieldsFields inherited from class jakarta.servlet.jsp.tagext.BodyTagSupportbodyContentFields inherited from class jakarta.servlet.jsp.tagext.TagSupportid, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.BodyTagEVAL_BODY_BUFFERED, EVAL_BODY_TAGFields inherited from interface jakarta.servlet.jsp.tagext.IterationTagEVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.TagEVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidProvide a mechanism to clear tag state, to handle servlet container JSP tag pooling behaviour with some servers, such as Glassfish.intdoEndTag()intabstract ComponentgetBean(ValueStack stack, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) protected voidDefine method to populate component state based on the Tag attributes.protected voidSpecialized method to populate the performClearTagStateForTagPoolingServers state of the Component to match the value set in the Tag.Methods inherited from class org.apache.struts2.views.jsp.StrutsBodyTagSupportfindString, findValue, findValue, getBody, getPerformClearTagStateForTagPoolingServers, getStack, release, setPerformClearTagStateForTagPoolingServers, toStringMethods inherited from class jakarta.servlet.jsp.tagext.BodyTagSupportdoAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContentMethods inherited from class jakarta.servlet.jsp.tagext.TagSupportfindAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.jsp.tagext.TaggetParent, setPageContext, setParent
- 
Field Details- 
component
 
- 
- 
Constructor Details- 
ComponentTagSupportpublic ComponentTagSupport()
 
- 
- 
Method Details- 
getBeanpublic abstract Component getBean(ValueStack stack, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) 
- 
doEndTagpublic int doEndTag() throws jakarta.servlet.jsp.JspException- Specified by:
- doEndTagin interface- jakarta.servlet.jsp.tagext.Tag
- Overrides:
- doEndTagin class- StrutsBodyTagSupport
- Throws:
- jakarta.servlet.jsp.JspException
 
- 
doStartTagpublic int doStartTag() throws jakarta.servlet.jsp.JspException- Specified by:
- doStartTagin interface- jakarta.servlet.jsp.tagext.Tag
- Overrides:
- doStartTagin class- jakarta.servlet.jsp.tagext.BodyTagSupport
- Throws:
- jakarta.servlet.jsp.JspException
 
- 
populateParamsprotected void populateParams()Define method to populate component state based on the Tag attributes. Descendants should override this method for custom behaviour, but should always call the ancestor method when doing so.
- 
populatePerformClearTagStateForTagPoolingServersParamprotected void populatePerformClearTagStateForTagPoolingServersParam()Specialized method to populate the performClearTagStateForTagPoolingServers state of the Component to match the value set in the Tag.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). 
- 
getComponent
- 
clearTagStateForTagPoolingServersprotected void clearTagStateForTagPoolingServers()Description copied from class:StrutsBodyTagSupportProvide a mechanism to clear tag state, to handle servlet container JSP tag pooling behaviour with some servers, such as Glassfish.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.- Overrides:
- clearTagStateForTagPoolingServersin class- StrutsBodyTagSupport
 
 
-