null
Return the action configuration for the specified path, if any; otherwise return null.
457458459460461462463464465466467
jsFormName = formName; if(jsFormName.charAt(0) == '/') { String mappingName = StrutsUtils.getActionMappingName(jsFormName); ModuleConfig mconfig = ModuleUtils.getInstance().getModuleConfig(request, app); ActionConfig mapping = (ActionConfig) mconfig.findActionConfig(mappingName); if (mapping == null) { throw new NullPointerException("Cannot retrieve mapping for action " + mappingName); } jsFormName = mapping.getAttribute(); }
196197198199200201202203204205206
} else if (forward != null) { selector = forward; object = config.findForwardConfig(forward); } else if (mapping != null) { selector = mapping; object = config.findActionConfig(mapping); } if (object == null) { JspException e = new JspException (messages.getMessage("struts.missing", selector)); RequestUtils.saveException(pageContext, e);
242243244245246247248249250251252
if (!linkString.startsWith("/")) { linkString = "/" + linkString; } SecureActionConfig secureConfig = (SecureActionConfig)moduleConfig. findActionConfig(linkString); return secureConfig; } return null;
465466467468469470471472473474475
108109110111112113114115116117118
// Calculate and cache the form name FormComponent form = (FormComponent) component; String action = form.getAction(); ModuleConfig moduleConfig = form.lookupModuleConfig(context); ActionConfig actionConfig = moduleConfig.findActionConfig(action); if (actionConfig == null) { throw new IllegalArgumentException("Cannot find action '" + action + "' configuration"); } String beanName = actionConfig.getAttribute();
4647484950515253545556
// Identify the matching path for this request String path = getPath(actionCtx); // Cache the corresponding ActonConfig instance ModuleConfig moduleConfig = actionCtx.getModuleConfig(); ActionConfig actionConfig = moduleConfig.findActionConfig(path); if (actionConfig == null) { // NOTE Shouldn't this be the responsibility of ModuleConfig? // Locate the mapping for unknown paths (if any) ActionConfig[] configs = moduleConfig.findActionConfigs();
442443444445446447448449450451452
// Look up the application module configuration information we need ModuleConfig moduleConfig = lookupModuleConfig(context); // Look up the ActionConfig we are processing String action = getAction(); ActionConfig actionConfig = moduleConfig.findActionConfig(action); if (actionConfig == null) { throw new IllegalArgumentException("Cannot find action '" + action + "' configuration"); }
6768697071727374757677
ModuleConfig moduleConfig = factory.createModuleConfig(PACKAGE_NAME); assertNotNull(moduleConfig); assertEquals("/"+PACKAGE_NAME, moduleConfig.getPrefix()); ActionConfig actionConfig = moduleConfig.findActionConfig("/action1"); assertNotNull(actionConfig); assertEquals("/action1", actionConfig.getPath()); ActionConfig[] actionConfigs = moduleConfig.findActionConfigs(); assertNotNull(actionConfigs);
140141142143144145146147148149150
} else if (forward != null) { selector = forward; object = config.findForwardConfig(forward); } else if (mapping != null) { selector = mapping; object = config.findActionConfig(mapping); } if (object == null) { JspException e = new JspException(messages.getMessage("struts.missing", selector));