org.apache.taglibs.response
Class ContainsHeaderTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byorg.apache.taglibs.response.ContainsHeaderTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class ContainsHeaderTag
extends javax.servlet.jsp.tagext.TagSupport

JSP Tag containsHeader, used to determine if the Http Response contains the header named name.

Includes the body of the tag if the header exists.

You can set the optional tag attribute value to true or false. The body of the tag is included if containsHeader matches the value.

JSP Tag Lib Descriptor

 <name>containsHeader</name>
 <tagclass>org.apache.taglibs.response.ContainsHeaderTag</tagclass>
 <bodycontent>JSP</bodycontent>
 <info>Test whether the HTTP Response contains a header.</info>
   <attribute>
     <name>name</name>
     <required>required</required>
     <rtexprvalue>false</rtexprvalue>
   </attribute>
   <attribute>
     <name>value</name>
     <required>false</required>
     <rtexprvalue>false</rtexprvalue>
   </attribute>
 

Author:
Glenn Nielsen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ContainsHeaderTag()
           
 
Method Summary
 int doStartTag()
          Used to test whether the HTTP Response contains a header.
 void setName(java.lang.String nam)
          Required attribute, name of the header.
 void setValue(boolean value)
          Set the optional tag attribute value to true or false.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainsHeaderTag

public ContainsHeaderTag()
Method Detail

doStartTag

public final int doStartTag()
                     throws javax.servlet.jsp.JspException
Used to test whether the HTTP Response contains a header.

Returns:
SKIP_BODY if containsHeader doesn't match value, EVAL_BODY_INCLUDE if containsHeader matches value
Throws:
javax.servlet.jsp.JspException

setValue

public final void setValue(boolean value)
Set the optional tag attribute value to true or false.


setName

public final void setName(java.lang.String nam)
Required attribute, name of the header.



Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.