I am testing the struts-blank example, I made some changes to try use
multiple config files....

I defined my web.xml like this:

    <init-param>
      <param-name>config/action-mappings</param-name>
      <param-value>/WEB-INF/action-mappings.xml</param-value>
    </init-param>
        <init-param>
      <param-name>config/form-beans</param-name>
      <param-value>/WEB-INF/form-beans.xml</param-value>
    </init-param>
    <init-param>
      <param-name>config/data-sources</param-name>
      <param-value>/WEB-INF/data-sources.xml</param-value>
    </init-param>
    <init-param>
      <param-name>config/global-exceptions</param-name>
      <param-value>/WEB-INF/global-exceptions.xml</param-value>
    </init-param>
    <init-param>
      <param-name>config/global-forwards</param-name>
      <param-value>/WEB-INF/global-forwards.xml</param-value>
    </init-param>
        <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>

And for my action-mappings I defined the action-mapping.xml like this:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

<struts-config>

<!-- =================================== Action Mapping Definitions -->

    <action-mappings>

            <!-- Default "Welcome" action -->
            <!-- Forwards to Welcome.jsp -->
        <action
            path="/Welcome"
            type="org.apache.struts.actions.ForwardAction"
            parameter="/pages/Welcome.jsp"/>

    <!-- sample input and input submit actions

        <action
            path="/Input"
            type="org.apache.struts.actions.ForwardAction"
            parameter="/pages/Input.jsp"/>

        <action
            path="/InputSubmit"
            type="app.InputAction"
            name="inputForm"
            scope="request"
            validate="true"
            input="/pages/Input.jsp"/>

    end samples -->

    </action-mappings>

</struts-config>

And I got the followin error:

javax.servlet.ServletException: Cannot create redirect URL:
java.net.MalformedURLException: Cannot retrieve ActionForward named welcome 
How can I correctly support multiple config files?



Tiago Henrique C. R. Alves


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to