org.apache.taglibs.request
Class HeaderValuesTag
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagSupport
|
+--javax.servlet.jsp.tagext.BodyTagSupport
|
+--org.apache.taglibs.request.HeaderValuesTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.BodyTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class HeaderValuesTag
- extends javax.servlet.jsp.tagext.BodyTagSupport
JSP Tag headerValuess, used to get HTTP header values for
headers which can have multiple values such as Language
using the standard JSP <jsp:getProperty> tag.
The script variable of name id is availble only within the
body of the headerValues tag.
Loops through all the header values for a header.
Must be nested within a headers tag.
JSP Tag Lib Descriptor
<name>headerValues</name>
<tagclass>org.apache.taglibs.request.HeaderValuesTag</tagclass>
<teiclass>org.apache.taglibs.request.HeaderValuesTEI</teiclass>
<bodycontent>JSP</bodycontent>
<info>Loop through all the values for a header which has multiple values.</info>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
- Author:
- Glenn Nielsen
- See Also:
HeadersTag, 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 headerValues tag. |
int |
doEndTag()
Method called at end of Tag |
int |
doStartTag()
Gets the header values for the current header. |
java.lang.String |
getHeader()
Returns the value of the header. |
| 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 |
HeaderValuesTag
public HeaderValuesTag()
doStartTag
public final int doStartTag()
throws javax.servlet.jsp.JspException
- Gets the header values for the current header.
- Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- SKIP_BODY if no header values exist, EVAL_BODY_TAG if header values exist
doAfterBody
public final int doAfterBody()
throws javax.servlet.jsp.JspException
- Method called at end of each headerValues tag.
- Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- EVAL_BODY_TAG if there is another header value, or SKIP_BODY if there are no more header values
doEndTag
public final int doEndTag()
throws javax.servlet.jsp.JspException
- Method called at end of Tag
- Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- EVAL_PAGE
getHeader
public final java.lang.String getHeader()
- Returns the value of the header.
<jsp:getProperty name="id" property="header"/>
- Returns:
- String - value of the header
Copyright ? 2000 Apache Software Foundation. All Rights Reserved.