GeeCON Prague 2014*
The moose likes Struts and the fly likes Order of tag elements in struts-config.xml is strict ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Order of tag elements in struts-config.xml is strict ?" Watch "Order of tag elements in struts-config.xml is strict ?" New topic
Author

Order of tag elements in struts-config.xml is strict ?

Shaan patil
Ranch Hand

Joined: Dec 22, 2007
Posts: 58
Hi Ranchites,

Is it mandatory to declare the form beans tag as the first element in the struts-config.xml ?

Basically I want to know , Should we keep the order of tag elements as given i n the blank.war file that we get from apache ?

Regards


"You cannot change the truth but truth can change you "
Srilakshmi Vara
Ranch Hand

Joined: Jul 21, 2004
Posts: 169
Yes you need to maintain the order

First Action Form then Action Mapping, because you refer the form name in the action mapping.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30580
    
154

Shaan,
Struts uses a DTD which is what requires the specific order in the XML.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Here is the order (at least for Struts 1.1):

<!ELEMENT struts-config (data-sources?, form-beans?, global-exceptions?, global-forwards?, action-mappings?, controller?, message-resources*, plug-in*)>

- Brent
 
GeeCON Prague 2014
 
subject: Order of tag elements in struts-config.xml is strict ?