my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android 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
Similar Threads
load on start up
Servlet Error
Form problems in jsp and struts
problem with LookupDispatchAction