null
Return the action configuration for the specified path, if any; otherwise return null.
9899100101102103104105106107108
{ if ( _mapping == null && _mappingPath != null ) { ModuleConfig mc = pfc.getModuleConfig(); assert mc != null : "no ModuleConfig found for " + pfc.getClass().getName(); _mapping = ( ActionMapping ) mc.findActionConfig( _mappingPath ); } if ( _forward != null && _forward instanceof Forward ) { ( ( Forward ) _forward ).reinitialize( pfc );
159160161162163164165166167168169
// Calculate and cache the form name FormComponent form = (FormComponent) component; String action = form.getAction(); ModuleConfig moduleConfig = form.lookupModuleConfig(context); ActionConfig actionConfig = moduleConfig.findActionConfig(action); String beanName = actionConfig.getAttribute(); form.setAttribute("beanName", beanName); // Render the beginning of this form ResponseWriter writer = context.getResponseWriter();
244245246247248249250251252253254
if (!linkString.startsWith("/")) { linkString = "/" + linkString; } SecureActionConfig secureConfig = (SecureActionConfig)moduleConfig. findActionConfig(linkString); return secureConfig; } return null;
456457458459460461462463464465466
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(); }
120121122123124125126127128129130
// Cache the corresponding ActonConfig instance WebContext wcontext = (WebContext) context; ModuleConfig moduleConfig = (ModuleConfig) wcontext.get(getModuleConfigKey()); ActionConfig actionConfig = moduleConfig.findActionConfig(path); if (actionConfig == null) { // Locate the mapping for unknown paths (if any) ActionConfig configs[] = moduleConfig.findActionConfigs(); for (int i = 0; i < configs.length; i++) {
144145146147148149150151152153154
} 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)); TagUtils.getInstance().saveException(pageContext, e);
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"); }
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); String beanName = actionConfig.getAttribute(); if (beanName != null) { form.getAttributes().put("beanName", beanName); }
7374757677787980818283
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);
243244245246247248249250251252253