Return the forward configuration for the specified key, if any; otherwise return null.
null
90919293949596979899100
List fconfigs = new ArrayList(); fconfigs.add(mConfig.findForwardConfig(mForward)); if (mSubforwards != null) { String[] subforwards = mSubforwards.split(","); for (int i=0; i<subforwards.length; i++) { fconfigs.add(mConfig.findForwardConfig(subforwards[i])); } } for (Iterator iter = fconfigs.iterator(); iter.hasNext();) { ForwardConfig fconfig = (ForwardConfig)iter.next(); String fwdPath = fconfig.getPath();
160161162163164165166167168169170
{ ServletContext ctx = RollerContext.getServletContext(); ModuleConfig mConfig = RequestUtils.getModuleConfig(req, ctx); ActionMapping amapping = (ActionMapping)req.getAttribute(Globals.MAPPING_KEY); List fconfigs = new ArrayList(); fconfigs.add(mConfig.findForwardConfig(mForward)); if (mSubforwards != null) { String[] subforwards = mSubforwards.split(","); for (int i=0; i<subforwards.length; i++) { fconfigs.add(mConfig.findForwardConfig(subforwards[i])); }
164165166167168169170171172173174
516517518519520521522523524525526
// Calculate the appropriate URL StringBuffer url = new StringBuffer(); HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); if (forward != null) { ForwardConfig fc = config.findForwardConfig(forward); if (fc == null) { throw new MalformedURLException(messages.getMessage("computeURL.forward", forward)); } if (fc.getRedirect()) { redirect = true;
423424425426427428429430431432433
// Calculate the appropriate URL StringBuffer url = new StringBuffer(); HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); if (forward != null) { ForwardConfig forwardConfig = moduleConfig.findForwardConfig(forward); if (forwardConfig == null) { throw new MalformedURLException(messages.getMessage("computeURL.forward", forward)); } if (forwardConfig.getRedirect()) { redirect = true;
135136137138139140141142143144145
// Look up the desired ActionForward entry ActionForward forward = null; ModuleConfig config = RequestUtils.getModuleConfig(pageContext); if (config != null) forward = (ActionForward) config.findForwardConfig(name); if (forward == null) { JspException e = new JspException (messages.getMessage("forward.lookup", name)); RequestUtils.saveException(pageContext, e); throw e;
431432433434435436437438439440441
8384858687888990919293
ExceptionConfig[] exceptionConfigs = moduleConfig.findExceptionConfigs(); assertNotNull(exceptionConfigs); assertEquals(1, exceptionConfigs.length); ForwardConfig fwdConfig = moduleConfig.findForwardConfig("globalResult"); assertNotNull(fwdConfig); assertEquals("globalResult", fwdConfig.getName()); // These methods are currently not implemented -- replace as functionality is added. assertNYI(moduleConfig, "getControllerConfig", null);
232233234235236237238239240241242
ModuleConfig config = mapping.getModuleConfig(); if (config == null) { config = new ModuleConfigImpl(""); mapping.setModuleConfig(config); } ForwardConfig forwardConfig = config.findForwardConfig(name); if (forwardConfig == null) { config.addForwardConfig(new ActionForward(name, path, false)); } else { forwardConfig.setPath(path); }
416417418419420421422423424425426
// No ActionConfig forward? // Find the ForwardConfig in the global-forwards. if(fc == null) { fc = moduleConfig.findForwardConfig(forward); // ok, give up if (fc == null) { return null;