You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by e-denton Java Programmer <ja...@e-denton.com> on 2004/10/06 21:44:12 UTC

Bad XML?

I am getting this Tomcat error on my remote server (It runs on my local
server):

"Oct 6, 2004 12:35:25 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 321 column 17: The content of element type
"struts-config" must match
"(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappi
ngs?,controller?,message-resources*,plug-in*)".
org.xml.sax.SAXParseException: The content of element type "struts-config"
must match
"(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappi
ngs?,controller?,message-resources*,plug-in*)".
 at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)"

But, I can't see what's wrong with my XML below:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
 "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
 "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>

<form-beans>
 <form-bean name="categoryForm"  type="com.cnw.portal.form.CategoryForm"/>
 <form-bean name="clientForm"    type="com.cnw.portal.form.ClientForm"/>
 <form-bean name="hierarchyForm" type="com.cnw.portal.form.HierarchyForm"/>
 <form-bean name="listingForm"   type="com.cnw.portal.form.ListingForm"/>
 <form-bean name="quoteForm"     type="com.cnw.portal.form.QuoteForm"/>
 <form-bean name="eventForm"     type="com.cnw.portal.form.EventForm"/>
 </form-beans>


<global-exceptions></global-exceptions>


<global-forwards>
 <forward   name="about"      path="/about.do"/>
 <forward   name="aboutSite"  path="/aboutSite.do"/>
 <forward   name="adDesign"      path="/adDesign.do"/>
 <forward   name="adRates"      path="/adRates.do"/>
 <forward   name="advertise"  path="/advertise.do"/>
 <forward   name="apply"      path="/apply.do"/>
 <forward   name="bannerClick"  path="/bannerClick.do"/>
 <forward   name="beAnEditor"  path="/beAnEditor.do"/>
 <forward   name="community"  path="/community.do"/>
 <forward   name="contact"      path="/contact.do"/>
 <forward   name="daysEvents"  path="/daysEvents.do"/>
 <forward   name="directory"  path="/directory.do"/>
 <forward   name="event"      path="/event.do"/>
 <forward   name="link2us"      path="/link2us.do"/>
    <forward   name="login"         path="/login.do"/>
    <forward   name="logout"      path="/logout.do"/>
    <forward   name="maintenance"  path="/maintenance.do"/>
 <forward   name="privacy"      path="/privacy.do"/>
 <forward   name="root"          path="/root.do"/>
 <forward   name="terms"      path="/terms.do"/>
 <forward   name="weather"      path="/weather.do"/>
    <forward   name="welcome"     path="/welcome.do"/>
</global-forwards>


<!-- Action Mapping Definitions -->
<action-mappings>

 <!-- Default Action -->
    <action path="/default"
            type="com.cnw.portal.action.Forward"
            scope="request"
   unknown="true"
   parameter="/welcome.jsp"/>

 <!-- Process a root directory query -->
 <action path="/root"
      type="com.cnw.portal.action.RootDirectory"
   scope="request">
  <forward name="success" path="/rootDirectory.jsp"/>
 </action>

 <!-- Process a directory query -->
    <action path="/directory"
      type="com.cnw.portal.action.Directory"
   scope="request">
  <forward name="success" path="/directory.jsp"/>
    </action>

 <!-- Process a banner click -->
    <action path="/bannerClick"
      type="com.cnw.portal.action.BannerClick"
   scope="request">
  <forward name="failure" path="/advertise.jsp"/>
  <forward name="success" path="/welcome.jsp"/>
    </action>

 <!-- Process a user logout -->
    <action path="/logout"
            type="com.cnw.portal.action.LogoutAction">
  <forward name="success" path="/welcome.jsp"/>
    </action>

 <!-- Process a calendar event -->
    <action path="/event"
            type="com.cnw.portal.action.Event"
    parameter="event"
            scope="request">
  <forward name="success" path="/event.jsp"/>
    </action>

 <!-- Process a particular day's events -->
    <action path="/daysEvents"
            type="com.cnw.portal.action.Event"
    parameter="events"
            scope="request">
  <forward name="success" path="/daysEvents.jsp"/>
    </action>

 <!-- Process a user login -->
    <action path="/login"
            type="portal.action.Login"
            name="loginForm"
            scope="request"
            input="/login.jsp">
  <forward name="success" path="/welcome.jsp"/>
    </action>

 <!-- Process a user logoff -->
    <action path="/logoff"
            type="portal.action.Logoff"
            name="loginForm"
            scope="request"
            input="/login.jsp">
  <forward name="success" path="/welcome.jsp"/>
    </action>

<!-- ************************************ -->
 <!-- Portal datastore maintenance -->
    <action path="/maintenance"
            type="org.apache.struts.actions.ForwardAction"
            scope="request"
   parameter="/maint/maintenance.jsp"/>

    <!-- Process category table maintenance -->
    <action path="/maintCategory"
            type="com.cnw.portal.action.Category"
    parameter="maint"
            name="categoryForm"
            scope="request"
            validate="false">
  <forward name="success" path="/maint/maintCategory.jsp"/>
    </action>

    <!-- Process delete category maintenance -->
    <action path="/maintDeleteCategory"
            type="com.cnw.portal.action.Category"
    parameter="delete"
            name="categoryForm"
            scope="request"
            validate="false">
  <forward name="success" path="/maintCategory.do"/>
    </action>

    <!-- Process new category -->
    <action path="/maintNewCategory"
            type="org.apache.struts.actions.ForwardAction"
            scope="request"
            parameter="/maint/editCategory.jsp"/>

    <!-- Process edit category -->
    <action path="/maintEditCategory"
            type="com.cnw.portal.action.Category"
     parameter="edit"
            name="categoryForm"
            scope="request"
            validate="false">
  <forward name="success" path="/maint/editCategory.jsp"/>
    </action>

    <!-- Process update category -->
    <action path="/maintUpdateCategory"
            type="com.cnw.portal.action.Category"
     parameter="update"
            name="categoryForm"
            scope="request"
            input="/maint/editCategory.jsp">
  <forward name="success" path="/maintCategory.do"/>
    </action>


    <!-- Process client table maintenance -->
    <action path="/maintClient"
            type="com.cnw.portal.action.Client"
     parameter="maint"
            name="clientForm"
            scope="request"
            input="/maint/maintClient.jsp">
  <forward name="success" path="/maint/maintClient.jsp"/>
    </action>


    <!-- Process hierarchy table maintenance -->
    <action path="/maintHierarchy"
            type="com.cnw.portal.action.MaintHierarchy"
            name="hierarchyForm"
            scope="request"
            input="/maint/maintHierarchy.jsp">
  <forward name="success" path="/maintenance.do"/>
    </action>

    <!-- Process listing table maintenance -->
    <action path="/maintListing"
            type="com.cnw.portal.action.Listing"
     parameter="maint"
            name="listingForm"
            scope="request"
            input="/maint/maintListing.jsp">
  <forward name="success" path="/maintenance.do"/>
    </action>

<!-- Process quote table maintenance -->
    <action path="/maintQuote"
            type="org.apache.struts.actions.ForwardAction"
            scope="request"
   parameter="/maint/maintQuote.jsp"/>

    <!-- Process new quote -->
    <action path="/maintNewQuote"
            type="org.apache.struts.actions.ForwardAction"
            scope="request"
            parameter="/maint/editQuote.jsp"/>

    <!-- Process edit quote -->
    <action path="/maintEditQuote"
            type="com.cnw.portal.action.Quote"
   parameter="edit"
            name="quoteForm"
            scope="request"
            validate="false">
  <forward name="success" path="/maint/editQuote.jsp"/>
    </action>

    <!-- Process update quote -->
    <action path="/maintUpdateQuote"
            type="com.cnw.portal.action.Quote"
    parameter="update"
            name="quoteForm"
            scope="request"
            input="/maint/editQuote.jsp">
  <forward name="success" path="/maintQuote.do"/>
    </action>

 <!-- Simple forward so caller is saved -->
    <action path="/about"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/about.jsp"/>

    <action path="/aboutSite"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/aboutSite.jsp"/>

    <action path="/adDesign"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/adDesign.jsp"/>

    <action path="/adRates"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/adRates.jsp"/>

    <action path="/advertise"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/advertise.jsp"/>

    <action path="/apply"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/apply.jsp"/>

    <action path="/beAnEditor"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/beAnEditor.jsp"/>

    <action path="/community"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/community.jsp"/>

    <action path="/contact"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/contact.jsp"/>

    <action path="/offsite"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/offsiteFrameset.jsp"/>

    <action path="/link2us"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/link2us.jsp"/>

    <action path="/privacy"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/privacy.jsp"/>

    <action path="/terms"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/terms.jsp"/>

    <action path="/weather"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/weather.jsp"/>

    <action path="/welcome"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/welcome.jsp"/>

</action-mappings>

<controller
 maxFileSize="50K"
 nocache="true"
 tempDir="WEB-INF/upload"/>;

<message-resources parameter="PortalMessages"  null="false"/>
<message-resources parameter="PortalResources" null="false"
key="PortalResources"/>

</struts-config>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Bad XML?

Posted by Matt Bathje <mp...@ntsource.com>.
e-denton Java Programmer wrote:

> I am getting this Tomcat error on my remote server (It runs on my local
> server):
> 
> "Oct 6, 2004 12:35:25 PM org.apache.commons.digester.Digester error
> SEVERE: Parse Error at line 321 column 17: The content of element type
> "struts-config" must match
> "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappi
> ngs?,controller?,message-resources*,plug-in*)".
> org.xml.sax.SAXParseException: The content of element type "struts-config"
> must match
> "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappi
> ngs?,controller?,message-resources*,plug-in*)".
>  at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)"
> 
> But, I can't see what's wrong with my XML below:
> 

[snip]
> 
> <controller
>  maxFileSize="50K"
>  nocache="true"
>  tempDir="WEB-INF/upload"/>;
> 

Here is my first guess...

[snip]

Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org