/** * Return the url encoded to maintain the user session, if any. */ public String getEncodeURL(String url) { if ((session != null) && (response != null)) { boolean redirect = false; if (forward != null) redirect = forward.getRedirect(); if (redirect) return response.encodeRedirectURL(url); else return response.encodeURL(url); } else return (url); }
if (forward.getRedirect()) {
/** * <p>Construct a new instance based on the values of another * ForwardConfig.</p> * * @param copyMe A ForwardConfig instance to copy * @since Struts 1.3.6 */ public ForwardConfig(ForwardConfig copyMe) { this(copyMe.getName(), copyMe.getPath(), copyMe.getRedirect(), copyMe.getModule()); }
public class CustomizedTileProcessor extends TilesRequestProcessor { @Override protected void processForwardConfig(HttpServletRequest pRequest, HttpServletResponse pResponse, ForwardConfig pForward) throws IOException, ServletException { if(isChromeBrowser(pRequest)) { ForwardConfig newForward = new ForwardConfig(pForward.getName(), pForward.getPath()+"_chrome", pForward.getRedirect(), pForward.getContextRelative()); super.processForwardConfig(pRequest, pResponse, newForward); } else { super.processForwardConfig(pRequest, pResponse, pForward); } } }
if (forward.getRedirect()) {
if (forward.getRedirect()) {
if (forward.getRedirect()) {
/** * <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()); }
if (response.isCommitted() && !forwardConfig.getRedirect()) { handleAsInclude(uri, servletContext, request, response); } else if (forwardConfig.getRedirect()) { handleAsRedirect(uri, request, response); } else {
path = config.getPrefix() + path; if (forward.getRedirect()) { this.doRedirect(path); } else {
if (!getRedirect()) { setRedirect(config.getRedirect());
cfg.setName(fConfigs[x].getName()); cfg.setPath(convertParam(fConfigs[x].getPath(), vars)); cfg.setRedirect(fConfigs[x].getRedirect()); config.removeForwardConfig(fConfigs[x]); config.addForwardConfig(cfg);
cfg.setRedirect(fConfigs[x].getRedirect()); cfg.setCommand(convertParam(fConfigs[x].getCommand(), vars)); cfg.setCatalog(convertParam(fConfigs[x].getCatalog(), vars));