Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.taglib.bean
Class HeaderTag

    java.lang.Object
      javax.servlet.jsp.tagext.TagSupport
          org.apache.struts.taglib.bean.HeaderTag

All Implemented Interfaces:
  Serializable, IterationTag, Tag

    public class HeaderTag

extends TagSupport

Define a scripting variable based on the value(s) of the specified header received with this request.

Version:
  $Rev: 471754 $ $Date: 2004-10-16 12:38:42 -0400 (Sat, 16 Oct 2004) $
See Also:
  Serialized Form

Field Summary
`protected String` | `id` The name of the scripting variable that will be exposed as a page scope attribute.
`protected static MessageResources` | `messages` The message resources for this package.
`protected String` | `multiple` Return an array of header values if `multiple` is non-null.
`protected String` | `name` The name of the header whose value is to be exposed.
`protected String` | `value` The default value to return if no header of the specified name is found.

Fields inherited from class javax.servlet.jsp.tagext.TagSupport
`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
`HeaderTag()`

Method Summary
`int` | `doStartTag()` Retrieve the required property and expose it as a scripting variable.
`String` | `getId()`
`String` | `getMultiple()`
`String` | `getName()`
`String` | `getValue()`
`protected void` | `handleMultipleHeaders()` Expose an array of header values.
`protected void` | `handleSingleHeader()` Expose a single header value.
`void` | `release()` Release all allocated resources.
`void` | `setId(String id)`
`void` | `setMultiple(String multiple)`
`void` | `setName(String name)`
`void` | `setValue(String value)`

Methods inherited from class javax.servlet.jsp.tagext.TagSupport
`doAfterBody, doEndTag, findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### messages

    protected static MessageResources messages

  The message resources for this package.

### id

    protected String id

  The name of the scripting variable that will be exposed as a page scope attribute.

### multiple

    protected String multiple

  Return an array of header values if `multiple` is non-null.

### name

    protected String name

  The name of the header whose value is to be exposed.

### value

    protected String value

  The default value to return if no header of the specified name is found.

Constructor Detail

### HeaderTag

    public HeaderTag()

Method Detail

### getId

    public String getId()

  Overrides:
    `getId` in class `TagSupport`

### setId

    public void setId(String id)

  Overrides:
    `setId` in class `TagSupport`

### getMultiple

    public String getMultiple()

### setMultiple

    public void setMultiple(String multiple)

### getName

    public String getName()

### setName

    public void setName(String name)

### getValue

    public String getValue()

### setValue

    public void setValue(String value)

### doStartTag

    public int doStartTag()
                   throws JspException

  Retrieve the required property and expose it as a scripting variable.

  Specified by:
    `doStartTag` in interface `Tag`
  Overrides:
    `doStartTag` in class `TagSupport`
  Throws:
    `JspException` - if a JSP exception has occurred

### handleMultipleHeaders

    protected void handleMultipleHeaders()
                                  throws JspException

  Expose an array of header values.

  Throws:
    `JspException`
  Since:
    Struts 1.2

### handleSingleHeader

    protected void handleSingleHeader()
                               throws JspException

  Expose a single header value.

  Throws:
    `JspException`
  Since:
    Struts 1.2

### release

    public void release()

  Release all allocated resources.

  Specified by:
    `release` in interface `Tag`
  Overrides:
    `release` in class `TagSupport`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.