This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
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
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply 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
internet detective
Marshal

Joined: May 26, 2003
Posts: 26496
    
  78

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Order of tag elements in struts-config.xml is strict ?
 
Similar Threads
For Multiple struts config.xml file what will be order while loading with ActionServlet.
can we change the order of appearance of the elements in struts-config.xml ?
Struts Survival Guide
XML Doubt
XML Doubt