Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Struts
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Struts section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 29th, 2009, 05:47 AM
Authorized User
 
Join Date: Sep 2008
Location: , , Singapore.
Posts: 87
Thanks: 1
Thanked 0 Times in 0 Posts
Default multiple struts-config.xml

Hi,
can we use multiple struts-config.xml files in one web application ,if so how can we map them.

Regards
Rajesh
 
Old June 25th, 2009, 05:48 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yep, You can. Try the following
Code:
    <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>
            org.apache.struts.action.ActionServlet
        </servlet-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>
                   /WEB-INF/struts-config1.xml,/WEB-INF/struts-config2.xml,/WEB-INF/struts-config3.xml
            </param-value>
        </init-param>
        <init-param>
            <param-name>debug</param-name>
            <param-value>3</param-value>
        </init-param>
        <init-param>
            <param-name>detail</param-name>
            <param-value>3</param-value>
        </init-param>
        <load-on-startup>0</load-on-startup>
    </servlet>
just separate them by ',' thats it
__________________
- Rakesh
http://iam-rakesh.blogspot.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
XML Config reader V1taminC XML 1 March 11th, 2008 09:11 AM
Folder deletion with XML Config Peroni Beginning VB 6 5 January 16th, 2008 08:11 PM
Using multiple config files Johan C# 1 October 6th, 2007 04:04 PM
problen struts 1.1 validator.xml DR POMPEII Struts 0 May 2nd, 2006 07:50 PM
Read XML Config File From Within EJB JAR leojhartiv J2EE 0 October 6th, 2003 03:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.