It's not a secret anymore!*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multiple struts-config file" Watch "Multiple struts-config file" New topic
Author

Multiple struts-config file

Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197
Hi,

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 ...

Regards,
vishnu.
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
Hi

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.


Regards,
vishnu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple struts-config file