com.opensymphony.webwork.views
Class AbstractHttpHeaderPopulatingResult
java.lang.Object
com.opensymphony.webwork.dispatcher.WebWorkResultSupport
com.opensymphony.webwork.views.AbstractHttpHeaderPopulatingResult
- All Implemented Interfaces:
- WebWorkStatics, Result, Serializable
- Direct Known Subclasses:
- HttpHeaderResult, JasperReportsResult
public abstract class AbstractHttpHeaderPopulatingResult
- extends WebWorkResultSupport
An abstract class that will auto populate the http response header of the current http request.
Subclass would want to override afterHttpHeadersPopulatedExecute(String, com.opensymphony.xwork.ActionInvocation)
which would be called, after the http headers are being populated into HttpServletResponse
.
Normally, we'd do
ActionContext.getContext().get(ServletActionContext.HTTP_RESPONSE);
or
ServetActionContext.getResponse();
to get hold of HttpServletResponse
.
- Version:
- $Date$ $Id$
- Author:
- tmjee
- See Also:
HttpHeaderResult
,
JasperReportsResult
,
Serialized Form
Method Summary |
protected abstract void |
afterHttpHeadersPopulatedExecute(String finalLocation,
ActionInvocation invocation)
This method is meant for subclass to override, it is called after the http headers
have been set into the current http response. |
void |
doExecute(String finalLocation,
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractHttpHeaderPopulatingResult
public AbstractHttpHeaderPopulatingResult()
getHeaders
public Map getHeaders()
- Returns a Map of all HTTP headers.
- Returns:
- a Map of all HTTP headers.
doExecute
public void doExecute(String finalLocation,
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:
doExecute
in class WebWorkResultSupport
- Parameters:
finalLocation
- invocation
- an encapsulation of the action execution state.
- Throws:
Exception
- if an error occurs when re-setting the headers.
afterHttpHeadersPopulatedExecute
protected abstract void afterHttpHeadersPopulatedExecute(String finalLocation,
ActionInvocation invocation)
throws Exception
- This method is meant for subclass to override, it is called after the http headers
have been set into the current http response.
- Parameters:
finalLocation
- invocation
-
- Throws:
Exception