Index: jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java =================================================================== RCS file: /home/cvspublic/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v retrieving revision 1.68.2.2 diff -u -r1.68.2.2 ActionServlet.java --- jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java 2001/06/13 17:07:55 1.68.2.2 +++ jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java 2001/10/22 02:45:51 @@ -72,6 +72,7 @@ import java.util.Iterator; import java.util.Locale; import java.util.MissingResourceException; +import java.util.StringTokenizer; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.UnavailableException; @@ -159,9 +160,9 @@ * resources bundle base class. [NONE] *
  • bufferSize - The size of the input buffer used when * processing file uploads. [4096]
  • - *
  • config - Context-relative path to the XML resource - * containing our configuration information. - * [/WEB-INF/struts-config.xml]
  • + *
  • config - Comma seperated list of context-relative paths + * to the XML resources containing our configuration information. + * [/WEB-INF/struts-config.xml,/WEB-INF/struts-config2.xml]
  • *
  • content - Default content type and character encoding * to be set on each response; may be overridden by a forwarded-to * servlet or JSP page. [text/html]
  • @@ -1310,34 +1311,44 @@ if (debug >= 1) log(internal.getMessage("configInit", config)); - // Acquire an input stream to our configuration resource - InputStream input = getServletContext().getResourceAsStream(config); - if (input == null) - throw new UnavailableException - (internal.getMessage("configMissing", config)); - - // Build a digester to process our configuration resource - Digester digester = null; - if (validate) - digester = initDigester(detail); - else - digester = initDigesterOld(detail); + // don't use fast + formBeans.setFast(false); + forwards.setFast(false); + mappings.setFast(false); + + // Process each config file + StringTokenizer st = new StringTokenizer(config, ","); + while (st.hasMoreTokens()) { + String configToken = st.nextToken().trim(); + + // Acquire an input stream to our configuration resource + InputStream input = getServletContext().getResourceAsStream(configToken); + if (input == null) + throw new UnavailableException + (internal.getMessage("configMissing", configToken)); + + // Build a digester to process our configuration resource + Digester digester = null; + if (validate) + digester = initDigester(detail); + else + digester = initDigesterOld(detail); - // Parse the input stream to configure our mappings - try { - formBeans.setFast(false); - forwards.setFast(false); - mappings.setFast(false); - digester.parse(input); - mappings.setFast(true); - forwards.setFast(true); - formBeans.setFast(true); - } catch (SAXException e) { - throw new ServletException - (internal.getMessage("configParse", config), e); - } finally { - input.close(); + // Parse the input stream to configure our mappings + try { + digester.parse(input); + } catch (SAXException e) { + throw new ServletException + (internal.getMessage("configParse", configToken), e); + } finally { + input.close(); + } } + + // use fast + mappings.setFast(true); + forwards.setFast(true); + formBeans.setFast(true); // Transitional support for old format if (!validate) {