Apache Struts 2 Documentation > Home > Guides > Core Developers Guide > Result Types > HttpHeader Result
Added by casey, last edited by Ted Husted on Sep 10, 2006  (view change)

A custom Result type for setting HTTP headers and status by optionally evaluating against the ValueStack.

Parameters

  • status - the http servlet response status code that should be set on a response.
  • parse - true by default. If set to false, the headers param will not be parsed for Ognl expressions.
  • headers - header values.

Examples

<result name="success" type="httpheader">
  <param name="status">204</param>
  <param name="headers.a">a custom header value</param>
  <param name="headers.b">another custom header value</param>
</result>