See now I knew I was going to feel incredibly stupid... I must have been staring at it too long because I didn't spoit that and it was completely obvious. You are competely correct, that fixed it. I should have caught that, it was obviously NOT valid according to the DTD with that. Thank you!!

Frank


From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Newbie question - struts-config.xml parse error
Date: Wed, 5 May 2004 16:39:17 -0400

Excessive?

    </action-mappings>
    <action-mappings>

Maybe the struts console could be of assistance?
http://www.jamesholmes.com/struts/

Dennis




"None None" <[EMAIL PROTECTED]> 05/05/2004 04:34 PM Please respond to "Struts Users Mailing List"

        To:     [EMAIL PROTECTED]
        cc:
        Subject:        Newbie question - struts-config.xml parse error


Hello all. I am a new struts user (but an accomplished web developer... don't ask how those statements can possibly be logical consistent! :) ) ... for my first learning project I decided to do a file manager app. I was going OK with the basics, but then I ran into an issue I can't seem to resolve...

I have the following struts-config.xml file:

<?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 Bean Definitions ********** -->
    <form-beans>
      <form-bean name="displayDrivesForm"
type="com.omnytex.ofm.actionform.DisplayDrivesForm" />
    </form-beans>
<!-- ********** Global Forward Definitions ********** -->
    <global-forwards>
      <forward name="main" path="/main.ofm" />
    </global-forwards>
<!-- ********** Action Mapping Definitions ********** -->
    <action-mappings>
      <action path="/main" type="org.apache.struts.actions.ForwardAction"
parameter="/jsp/main.jsp" />
    </action-mappings>
    <action-mappings>
      <action path="/listDrives"
type="org.apache.struts.actions.ListDrivesAction" name="ListDrivesForm"
scope="request" validate="false">
        <forward name="showDrivesList" path="drivesList.jsp" />
      </action>
    </action-mappings>
</struts-config>

(Blank lines removed to save space here).  Problem is, when I start up
Tomcat I'm getting the following parse error:

[ERROR] Digester - -Parse Error at line 34 column 17: The content of
element
typ
e "struts-config" must match
"(data-sources?,form-beans?,global-exceptions?,glob
al-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
<org.xm
l.sax.SAXParseException: The content of element type "struts-config" must
match
"(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?
,controller?,message-resources*,plug-in*)".>org.xml.sax.SAXParseException:

The c
ontent of element type "struts-config" must match
"(data-sources?,form-beans?,gl
obal-exceptions?,global-forwards?,action-mappings?,controller?,message-resources
*,plug-in*)".

This webapp was previously starting up normally until I started adding
some
things (specifically the form-beans and the local forward of the
listDrives
action)... and yes, I of course tried removing them, but the parse error
still occurs, so I don't know what I broke!

I don't see where the file is not validly following the DTD (I know it's
well-formed at least since loading it in IE doesn't show any error).  I'm
sure it's an obvious mistake to the more experienced Struts developers,
but
I've been looking at it for about an hour now, comparing to examples
elsewhere and not seenig what's wrong.  Anyone?  Thanks in advance!

Frank

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



_________________________________________________________________
Mother’s Day is May 9. Make it special with great ideas from the Mother’s Day Guide! http://special.msn.com/network/04mothersday.armx



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to