Search in sources :

Example 1 with RedirectingActionForward

use of org.apache.struts.action.RedirectingActionForward in project zoj by licheng.

the class BaseAction method handleSuccess.

/**
 * Handle successful exit with log. Helper method.
 *
 * @param mapping
 *            the action mapping that holds the forwards.
 * @param context
 *            the action context to access resources.
 * @param forwardName
 *            represents messsageKey if fail, forward name if succeed.
 *
 * @return the specified forward.
 */
protected ActionForward handleSuccess(ActionMapping mapping, ContextAdapter context, String forwardName, String parameter) {
    String newPath = mapping.findForward(forwardName).getPath() + parameter;
    ActionForward forward = new RedirectingActionForward(newPath);
    return this.handleSuccess(forward, context, forwardName);
}
Also used : RedirectingActionForward(org.apache.struts.action.RedirectingActionForward) ActionForward(org.apache.struts.action.ActionForward) RedirectingActionForward(org.apache.struts.action.RedirectingActionForward)

Aggregations

ActionForward (org.apache.struts.action.ActionForward)1 RedirectingActionForward (org.apache.struts.action.RedirectingActionForward)1