This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts-config.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts-config.xml" Watch "Struts-config.xml" New topic


Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197
Hi Ranchers,

I have one doubt, which one is first java class will read struts-config.xml file, (as of my consern action servlet is the first class to read struts-config.xml is it true or not).

Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Only a programmer with experience creating the Struts API will be able to answer your question. I doubt that it is the ActionServlet.

When an application is deployed in the web container, the Struts API reads the struts-config.xml and creates a group of objects which are a runtime representation of the information stored in the struts-config.xml file. Check out the:

struts-config.xml API



[ June 04, 2008: Message edited by: James Clark ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The ActionServlet's init method causes the struts-config.xml file to be loaded into memory. It obviously makes use of other classes to parse the XML and place the values into objects.

Consultant, Sima Solutions
Reshma Reddy
Ranch Hand

Joined: Dec 21, 2006
Posts: 197
Thanks for your replays, i got bit of clarity on this.

I agree. Here's the link:
subject: Struts-config.xml
It's not a secret anymore!