Two Laptop Bag
The moose likes Struts and the fly likes More than one Struts-Config.xml File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "More than one Struts-Config.xml File " Watch "More than one Struts-Config.xml File " New topic

More than one Struts-Config.xml File

Maneesh Chauahn
Ranch Hand

Joined: Mar 06, 2006
Posts: 48
Hi All,
I have one question on the struts-config.xml as i am reading a article on the struts and found the concept of the strut modules means a developer can define more than struts-config.xml file .

Can any please let me know what is the advantage of using more than one struts-config.xml file in the application

Thanks in advance for your prompt answers...

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Splitting up an application into more than one module is useful mainly for large projects with many developers working on them. If the struts-config file is broken up into separate files for each module, the developers responsible for working on that module can have a degree of autonomy. They can make whatever changes necessary to their module without stepping on changes being made to other modules.

Consultant, Sima Solutions
Yogendra Joshi
Ranch Hand

Joined: Apr 04, 2006
Posts: 213
As Merrill Suggested , She is absolutely correct.

Apart from that , it also becomes way too easy for a developer to Manage the complete config file. So 1 its useful when the project is big and different developers can work on their own struts-config file and 2 for Managing the File elegantly.

Regards ,
Yogendra Joshi.

Meri Zindagi Hain Tab Tak.. Jab Tak Tera Sahara.... Har Taraf Tu Hi Tu Hain SAI Tera Hi Hain Nazara.....
Deepak Tewari

Joined: Aug 04, 2005
Posts: 10
one thing also i would like to add if we have two modules and both of them do not communicate much with each other both can be developed independently and at the end of the development while integration testing of the whole application both of the modules can be merged and separate struts config
means easy to maintain, and debug

Deepak Tewari
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864

Thanks for your post, but please be aware that Merrill is a "he" rather than a "she".

Claudio Sosa

Joined: Feb 01, 2007
Posts: 1

Im using multiple struts-config files by modules, but at the time i want to use one module in a form tag <html:form action="/module1/" ....> i get an error, the application could not find an action config for /module1/action1

can you please help me to solve this issue?

i already configured web.xml to manage multiple struts config files.
I agree. Here's the link:
subject: More than one Struts-Config.xml File
It's not a secret anymore!