Your problem could be solve by this simple method <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml, /WEB-INF/struts-config-timesheet.xml, /WEB-INF/struts-config-recruitment.xml, /WEB-INF/struts-config-staffing.xml, /WEB-INF/struts-config-training.xml, /WEB-INF/struts-config-employeedetails.xml </param-value> </init-param>
Or else the following method posted by Craig. <?xml version="1.0"?> <!DOCTYPE ... [ <!ENTITY part1 SYSTEM "form-beans.xml"> <!ENTITY part2 SYSTEM "global-forwards.xml"> <!ENTITY part3 SYSTEM "action-mappings.xml"> ]> <struts-config> <form-beans> &part1; </form-beans> <global-forwards> &part2; </global-forwards> <action-mappings> &part3; </action-mappings> </struts-config> Mohan -----Original Message----- From: souravm [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 12:28 PM To: Struts Users Mailing List Subject: RE: Multiple struts-config.xml Hi Ashutosh, My application is huge one and hence the single struts-config.xml becomes bulky. Sometimes even we are getting exception while in purging the struts-config file. So I want to split it in two. >From that persepective after going through your mail I have two doubts regarding this. 1. Is splitting the file in the way you mentioned in your mail is possible in Struts 1.0.2 ? 2. If both the struts file related to same application how do we set the relative path of the second struts file in <param-name> element ? Regards, Sourav -----Original Message----- From: Ashutosh Satyam [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 10:37 AM To: Struts Users Mailing List Subject: RE: Multiple struts-config.xml Hi, In order to use multiple struts config file, you need to modify the web descriptor file as mentioned below. Thus, the ActionServlet loads each of the application related config file. <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/config/struts1.xml</param-value> </init-param> <init-param> <param-name>config/secondApp</param-name> <param-value>/WEB-INF/config/struts2.xml</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> While invoking the Action classes you need to use proper relative path. For this particular case, say you have an Action mapping - Action1 defined in struts1.xml and Action2 defined in struts2.xml To invoke them the URL should be http://hostname/Action1.do http://hostname/secondApp/Action2.do Regards, Ashutosh Satyam -----Original Message----- From: Sudhakar G [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 9:51 AM To: [EMAIL PROTECTED] Subject: Multiple struts-config.xml Hi, Can any one give me a example how struts supports multiple struts-config.xml file? Thanks in advance.. cheers Sudhakar DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]