com.opensymphony.webwork.dispatcher
Class HttpHeaderResult

java.lang.Object
  extended bycom.opensymphony.webwork.dispatcher.HttpHeaderResult
All Implemented Interfaces:
com.opensymphony.xwork.Result, Serializable

public class HttpHeaderResult
extends Object
implements com.opensymphony.xwork.Result

A custom Result type for evaluating HTTP headers against the ValueStack.

Author:
Jason Carreira
See Also:
Serialized Form

Field Summary
static String DEFAULT_PARAM
           
protected  boolean parse
           
 
Constructor Summary
HttpHeaderResult()
           
 
Method Summary
 void execute(com.opensymphony.xwork.ActionInvocation invocation)
          Sets the optional HTTP response status code and also re-sets HTTP headers after they've been optionally evaluated against the ValueStack.
 Map getHeaders()
          Returns a Map of all HTTP headers.
 void setParse(boolean parse)
          Sets whether or not the HTTP header values should be evaluated against the ValueStack (by default they are).
 void setStatus(int status)
          Sets the http servlet response status code that should be set on a response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PARAM

public static final String DEFAULT_PARAM
See Also:
Constant Field Values

parse

protected boolean parse
Constructor Detail

HttpHeaderResult

public HttpHeaderResult()
Method Detail

getHeaders

public Map getHeaders()
Returns a Map of all HTTP headers.

Returns:
a Map of all HTTP headers.

setParse

public void setParse(boolean parse)
Sets whether or not the HTTP header values should be evaluated against the ValueStack (by default they are).

Parameters:
parse - true if HTTP header values should be evaluated agains the ValueStack, false otherwise.

setStatus

public void setStatus(int status)
Sets the http servlet response status code that should be set on a response.

Parameters:
status - the Http status code
See Also:
HttpServletResponse.setStatus(int)

execute

public void execute(com.opensymphony.xwork.ActionInvocation invocation)
             throws Exception
Sets the optional HTTP response status code and also re-sets HTTP headers after they've been optionally evaluated against the ValueStack.

Specified by:
execute in interface com.opensymphony.xwork.Result
Parameters:
invocation - an encapsulation of the action execution state.
Throws:
Exception - if an error occurs when re-setting the headers.

WebWork Project Page