aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts-config.xml" Watch "Struts-config.xml" New topic
Author

Struts-config.xml

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).

Regards,
vardhan
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

ActionConfig.html

ActionMapping.html

ActionForward.html
[ 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.


Merrill
Consultant, Sima Solutions
Reshma Reddy
Ranch Hand

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

Regards,
vardhan
 
 
subject: Struts-config.xml