File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Can i have multiple struts-config files in struts1.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Can i have multiple struts-config files in struts1.1" Watch "Can i have multiple struts-config files in struts1.1" New topic
Author

Can i have multiple struts-config files in struts1.1

Purushotham Royal Pasupuleti
Greenhorn

Joined: Sep 15, 2009
Posts: 4
HI Friends,
Currently i am using struts1.1 application, Can i have multiple struts-config files for multiple url-patterrns for multiple modules in struts1.1.
If yes then how?

Thanks for your help...........


Purushotham Royal Pasupuleti,
Singapore
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
Yes We can have multiple strut-config in one application, For usage please check THIS link.


Thanks,
Shailesh
Purushotham Royal Pasupuleti
Greenhorn

Joined: Sep 15, 2009
Posts: 4
Hi Shailesh Narkhede,
Thanks alot for the suggestion.....but my scenario is


<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-config.xml, /WEB-INF/struts-config2.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.ac</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.dp</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>






Can i use for multiple url (</url-pattern> ) for different struts-config files

i Know we can use one single struts-config file we will consalidate all url-patterns like *.do,*.ac,*gf....
but my intension is different url-patterns(*.do,*.ac,*gf) for different struts-config files like struts-config-dispute.xml,struts-config-goodfaith.xml,struts-config-arbcomp.xml.....


Can you please help me on this......


Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
Hi Purushotham ,

Even if you had different struts config in yours application but all struts config will use only one ActionServlet so putting URL in single struts config or multiple struts config is one and the same.
I am not able to understand requirement for which you want to do this. Can you put some light on that?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can i have multiple struts-config files in struts1.1