org.apache.taglibs.session
Class AttributesTag
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagSupport
|
+--javax.servlet.jsp.tagext.BodyTagSupport
|
+--org.apache.taglibs.session.AttributesTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.BodyTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class AttributesTag
- extends javax.servlet.jsp.tagext.BodyTagSupport
JSP Tag attributes, used to get HttpSession attribute information
using the standard JSP <jsp:getProperty> tag.
The script variable of name id is availble only within the
body of the attributes tag.
Loops through all the attributes in the HttpSession.
JSP Tag Lib Descriptor
<name>attributes</name>
<tagclass>org.apache.taglibs.session.AttributesTag</tagclass>
<teiclass>org.apache.taglibs.session.AttributesTEI</teiclass>
<bodycontent>JSP</bodycontent>
<info>Used to loop through all session attributes.</info>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
- Author:
- Glenn Nielsen
- See Also:
- Serialized Form
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
int |
doAfterBody()
Method called at end of each iteration of the attributes tag. |
int |
doEndTag()
Method called at end of attributes tag, outputs the body
of the tag. |
int |
doStartTag()
Gets the session attributes. |
java.lang.String |
getName()
Returns the name of the session attribute. |
java.lang.String |
getValue()
Returns the value of the session attribute. |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
AttributesTag
public AttributesTag()
doStartTag
public final int doStartTag()
throws javax.servlet.jsp.JspException
- Gets the session attributes.
- Overrides:
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- SKIP_BODY if there are no session attributes, EVAL_BODY_TAG if an attribute exists
doAfterBody
public final int doAfterBody()
throws javax.servlet.jsp.JspException
- Method called at end of each iteration of the attributes tag.
- Overrides:
doAfterBody
in class javax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- EVAL_BODY_TAG if there is another session attribute, or SKIP_BODY if there are no more attributes
doEndTag
public final int doEndTag()
throws javax.servlet.jsp.JspException
- Method called at end of attributes tag, outputs the body
of the tag.
- Overrides:
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- EVAL_PAGE
getName
public final java.lang.String getName()
- Returns the name of the session attribute.
<jsp:getProperty name="id" property="name"/>
- Returns:
- String - the session attribute name
getValue
public final java.lang.String getValue()
- Returns the value of the session attribute.
<jsp:getProperty name="id" property="value"/>
- Returns:
- String - the value of the session attribute
Copyright ? 2000 Apache Software Foundation. All Rights Reserved.