72. How to setup struts to use multiple configuration files.

Struts can use multiple configuration files. Here is the configuration example:
<servlet>
        <servlet-name>banking</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet
        </servlet-class>
        <init-param>
        <param-name>config</param-name>
        <param-value>/WEB-INF/struts-config.xml,
                /WEB-INF/struts-authentication.xml,
                /WEB-INF/struts-help.xml
           </param-value>
    </init-param>

Advertisements

6 Responses

  1. […] 72. How to setup struts to use multiple configuration files. […]

  2. in struts,we use one textbox,one button named as save & we use two actions insert,delete. we click save button whether if insert action perform or delete action perform?

  3. I’m using multi config too, but some config not loaded, don’t know why.e.g all classes related one struts-confgi-2.xml won’t be generated.

  4. don’t know why , some of config files never get loaded

  5. I believe that this illustration is not going to work. We have two approaches to use multiple struts configuration files:
    1. First approach is using module based struts config files
    2. Second approach is splitting the struts config file into a number of files containg a specific set of structs config elements i.e. 1 config file for forward definition, a config file for error definitons, 1 config file for action mappings etc. For more details please refer : http://www.jamesholmes.com/struts/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: