aspose file tools*
The moose likes Struts and the fly likes How to include multiple struts entries in web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to include multiple struts entries in web.xml" Watch "How to include multiple struts entries in web.xml" New topic
Author

How to include multiple struts entries in web.xml

Rashmi Anand
Greenhorn

Joined: Feb 10, 2009
Posts: 11
Hi ,

I need to have two entries of struts in web.xml.
I have given this in web.xml
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml, /WEB-INF/struts-config-testcient.xml</param-value>
</init-param>
<init-param>
<param-name>config/testclient</param-name>
<param-value>/WEB-INF/struts-testclient.xml</param-value>
</init-param>

I am thinking how will container map when i hit http://localhost:7001/module/url1 --> it has to go to struts-config.xml
and when i hit http://localhost:7001/module/url2 --> it has to go to struts-testclient.xml

Need help!
TIA

Rashmi
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

This may help:
http://www.vaannila.com/struts/struts-example/multiple-struts-configuration-files-example-1.html


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Rashmi Anand
Greenhorn

Joined: Feb 10, 2009
Posts: 11
Hey Sagar,

Thankyou so much for the reference. I was able to have multiple entries of struts in web.xml

Regards,
Rashmi
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

If that solved your problem, then welcome
 
 
subject: How to include multiple struts entries in web.xml