Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Shaan patil
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Srilakshmi Vara
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shaan,
Struts uses a DTD which is what requires the specific order in the XML.
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic