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 web.xml and struts-config.xml 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 "web.xml and struts-config.xml" Watch "web.xml and struts-config.xml" New topic

web.xml and struts-config.xml

p hasini
Ranch Hand

Joined: Oct 24, 2009
Posts: 92
We configure struts-config.xml in our web.xml.

Does it mean only web.xml file is read during container startup.
or does the container read both files during startup.

Ankit Garg

Joined: Aug 03, 2008
Posts: 9291

The container only reads the web.xml file. The sturts-config.xml is read by the struts framework. Also as far as I remember, it is not compulsory to declare struts-config.xml in web.xml. You just need to define the ActionServlet as a servlet...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
I agree. Here's the link:
subject: web.xml and struts-config.xml
Similar Threads
Struts - Error - "Cannot find ActionMappings or ActionFormBeans collection"
Are listener and filter objects reused after a context reload?
Using Tiles with JSF (no struts)
application flow
Cannot find ActionMappings or ActionFormBeans collection