com.opensymphony.webwork.dispatcher
Class ServletRedirectResult

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

public class ServletRedirectResult
extends WebWorkResultSupport

Calls the sendRedirect method to the location specified.

This result follows the same rules from WebWorkResultSupport.

Author:
Patrick Lightbody
See Also:
Serialized Form

Field Summary
protected  boolean prependServletContext
           
 
Fields inherited from class com.opensymphony.webwork.dispatcher.WebWorkResultSupport
DEFAULT_PARAM, parse
 
Fields inherited from interface com.opensymphony.webwork.WebWorkStatics
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERLVET_DISPATCHER, SERVLET_CONFIG, SERVLET_DISPATCHER
 
Constructor Summary
ServletRedirectResult()
           
 
Method Summary
protected  void doExecute(String finalLocation, com.opensymphony.xwork.ActionInvocation invocation)
          Redirects to the location specified by calling HttpServletResponse.sendRedirect(String).
 void setPrependServletContext(boolean prependServletContext)
          Sets whether or not to prepend the servlet context path to the redirected URL.
 
Methods inherited from class com.opensymphony.webwork.dispatcher.WebWorkResultSupport
conditionalParse, execute, setLocation, setParse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prependServletContext

protected boolean prependServletContext
Constructor Detail

ServletRedirectResult

public ServletRedirectResult()
Method Detail

setPrependServletContext

public void setPrependServletContext(boolean prependServletContext)
Sets whether or not to prepend the servlet context path to the redirected URL.

Parameters:
prependServletContext - true to prepend the location with the servlet context path, false otherwise.

doExecute

protected void doExecute(String finalLocation,
                         com.opensymphony.xwork.ActionInvocation invocation)
                  throws Exception
Redirects to the location specified by calling HttpServletResponse.sendRedirect(String).

Specified by:
doExecute in class WebWorkResultSupport
Parameters:
finalLocation - the location to redirect to.
invocation - an encapsulation of the action execution state.
Throws:
Exception - if an error occurs when redirecting.

WebWork Project Page