RSS

The content of element type “struts-config” must match “(display-name?,description?,data-sources?,form-beans?,global-exceptions?, global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)”.

07 Aug

While working in struts recently I got this error.

“The content of element type “struts-config” must match “(display-name?,description?,data-sources?,form-beans?,global-exceptions?, global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)”.

From the error it was hard to find that what is wrong and where as I cross checked my struts-config file a number of times.  This error mainly comes because of the mixing of the order of struts elements. To solve this have a look of the DTD present at the given location

Location :-> http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd

Once your elements are in proper order the error will be solved.

Advertisements
 
7 Comments

Posted by on August 7, 2009 in Struts

 

7 responses to “The content of element type “struts-config” must match “(display-name?,description?,data-sources?,form-beans?,global-exceptions?, global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)”.

  1. Sagar

    August 11, 2009 at 12:25 pm

    That’s why all IDE nowadays comes with XML validator, which checks your XML for well formedness and validness. Always verify your XML before deploying the application.

     
    • himanshugpt

      August 14, 2009 at 7:23 am

      Thats right Sagar.
      But the error messages shown by the IDE are not well descriptive.
      The error message shown should have some suggestions which can lead user to the right direction.

       
  2. Sagar

    August 14, 2009 at 8:58 am

    Now that’s depends how well you know DTD for any XML. If I had this error, I would be checking the well formed ness for immediate tags for “struts-config”..

     
    • himanshugpt

      August 14, 2009 at 1:59 pm

      Thats impressive.. But that is not same for all..
      🙂

       
  3. ADITYA VALLURU

    March 31, 2012 at 11:43 am

    Thanks….

     
  4. phani

    October 20, 2012 at 1:53 pm

    thanks sagar

     
  5. Tanmoy Biswas

    December 20, 2012 at 10:04 am

    Just tried and this worked for me…… 😀 😀 ;D
    Thanks……………………

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: