This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Multiple struts-config file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multiple struts-config file" Watch "Multiple struts-config file" New topic

Multiple struts-config file

Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197

one application is having multiple struts-confg.xml is there i configured this struts-config files in web.xml with different names, but client is sending one request for 3rd module(in that apllication 3 modules is there and 3 struts-config.xml files is there)how the container will knows this request belongs to 3rd module and how the flow will goes ...

Anirvan Majumdar
Ranch Hand

Joined: Feb 22, 2005
Posts: 261
Basically all the module specific struts-config files specified in the webapp's web.xml file will be read and then stored in the memory. Thereof, any struts action mapping will be looked up in the loaded structure and the consequent mapping will be executed. The multiple struts-config files will have an entry in the web.xml like:

The programmer doesn't really have to write any module specific struts mappings. If two action mappings in different struts-config files are same, then a conflict will occur.
Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197

Thanks for your replay,
i just configured all this files in xml file after that how the container will knows for example one welcome page is for the first time there request is coming to welcome page and after that that request will need to do some businesslogic in 3rd module (assume that application will have 3 modules)how the request will goes to 3rd module.

jQuery in Action, 2nd edition
subject: Multiple struts-config file
Similar Threads
multiple struts-confing file
sub-module in struts 1.1?
Multiple struts config files and multiple modules
Can i have more than one ActionServlet in my web application
More than one Struts-Config.xml File