struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict" <pbened...@apache.org>
Subject Re: <global-exceptions> + <form-beans>, conflict?
Date Sun, 29 Apr 2007 04:21:21 GMT
The DTD specifies the order of tags. Your error message is telling you what
order they should appear in.

On 4/28/07, jiangshachina <jiangshachina@gmail.com> wrote:
>
>
> Hello,
> I think I get the reason -- sequence.
> <form-beans> must be prior to <global-exceptions>, like <servlet> and
> <servlet-mapping>.
>
> a cup of Java, cheers!
> Sha Jiang
>
>
> jiangshachina wrote:
> >
> > Hi guys,
> > I'm new to Struts.
> > I'm using Struts 1.3.8 + JBoss 4.0.5.GA + JDK 1.5.0 + Windows XP.
> >
> > I have a struts-config file as show as below,
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <!DOCTYPE struts-config PUBLIC
> >           "-//Apache Software Foundation//DTD Struts Configuration
> > 1.3//EN"
> >           "http://struts.apache.org/dtds/struts-config_1_3.dtd">
> > <struts-config>
> >       <global-exceptions>
> >               <exception key="login.failure" type="
> exception.LoginException"
> >                       path="/failure.jsp">
> >               </exception>
> >       </global-exceptions>
> >
> >       <form-beans>
> >               <form-bean name="userForm" type="form.UserForm" />
> >       </form-beans>
> > </struts-config>
> > When I started the JBoss, an org.xml.sax.SAXParseException was thrown,
> the
> > exception said:
> > The content of element type "struts-config" must match
> >
> "(display-name?,description?,form-beans?,global-exceptions?,global-forwards?,
> > action-mappings?,controller?,message-resources*,plug-in*)".
> > If I deleted element global-exceptions or form-beans from the
> > struts-config file, that would works well.
> > It seems that the two elements conflict with each other!?
> > I'm puzzled by the matter?
> >
> > a cup of Java, cheers!
> > Sha Jiang
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/%3Cglobal-exceptions%3E-%2B-%3Cform-beans%3E%2C-conflict--tf3664252.html#a10238633
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message