/** * Construct a new instance with the specified values. * * @param name Name of this forward * @param path Path to which control should be forwarded or redirected * @param redirect Should we do a redirect? * @param contextRelative Is this path context relative? * @deprecated Use module rather than contextRelative */ public ForwardConfig(String name, String path, boolean redirect, boolean contextRelative) { super(); setName(name); setPath(path); setRedirect(redirect); setContextRelative(contextRelative); }
/** * <p>Construct a new instance with the specified values.</p> * * @param name Name of this instance * @param path Path for this instance * @param redirect Redirect flag for this instance * @param contextRelative Context relative flag for this instance * @deprecated Use module rather than contextRelative */ public ActionForward(String name, String path, boolean redirect, boolean contextRelative) { super(); setName(name); setPath(path); setRedirect(redirect); setContextRelative(contextRelative); }
/** * Process the specified HTTP request, and create the corresponding HTTP * response (or forward to another web component that will create it). * Return an <code>ActionForward</code> instance describing where and how * control should be forwarded, or <code>null</code> if the response has * already been completed. * * @param mapping The ActionMapping used to select this instance * @param form The optional ActionForm bean for this request (if any) * @param request The HTTP request we are processing * @param response The HTTP response we are creating * * @exception Exception if an error occurs */ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // Create a RequestDispatcher the corresponding resource String path = mapping.getParameter(); if (path == null) { throw new ServletException(messages.getMessage("forward.path")); } // Let the controller handle the request ActionForward retVal = new ActionForward(path); retVal.setContextRelative(true); return retVal; }
/** * <p>Construct a new instance based on the values of another ActionForward.</p> * * @param copyMe An ActionForward instance to copy * @since Struts 1.2.1 */ public ActionForward(ActionForward copyMe) { this(copyMe.getName(),copyMe.getPath(),copyMe.getRedirect(),copyMe.getModule()); setContextRelative(copyMe.getContextRelative()); }
/** * <p>Construct a new instance with a {@link ForwardConfig} object * to copy name, path, and contextRelative values from.</p> * * @param baseConfig the {@link ForwardConfig} * to copy configuration values from */ public ActionRedirect(ForwardConfig baseConfig) { setName(baseConfig.getName()); setPath(baseConfig.getPath()); setContextRelative(baseConfig.getContextRelative()); setModule(baseConfig.getModule()); setRedirect(true); initializeParameters(); }
for (int x = 0; x < fConfigs.length; x++) { cfg = new ActionForward(); cfg.setContextRelative(fConfigs[x].getContextRelative()); cfg.setName(fConfigs[x].getName()); cfg.setPath(convertParam(fConfigs[x].getPath(), vars));