OK I tried to give out the error with the bundle and the property:

<tr>
      <td>mask</td>
      <td><bean:message bundle="test" 
key="validationExample.form.qnummer"/></td>
      <td><html:text property="qnummer"/></td>
      <td>&nbsp;
//--> try to write out the error!
<html:errors bundle="test"
           property="qnummer" /></td>
    </tr>



in the validation.xml!!

<field property="qnummer"
                 depends="mask">
                 <arg  bundle="test" position="0"  
key="validationExample.form.qnummer"/>
                 <arg position="1" name="mask" key="${var:mask}" 
resource="false"/>
                  <var>
                    <var-name>mask</var-name>
                    <var-value>^[QXqx0-9]*$</var-value>
                  </var>
          </field>


I get the following error:

Unhandled exception thrown during validation: No message resources found for 
bundle: org.apache.struts.action.MESSAGE

java.lang.NullPointerException: No message resources found for bundle: 
org.apache.struts.action.MESSAGE


This makes me mad! But thank's a lot for your help!






---------- Initial Header -----------

>From      : "Niall Pemberton" [EMAIL PROTECTED]
To          : "Struts Users Mailing List" user@struts.apache.org
Cc          :
Date      : Mon, 28 Nov 2005 08:28:24 +0000
Subject : Re: Bug in Struts Validator?how to move to 1.4







> There is a bug in Struts 1.2.7 <html:messages> tag that affects
> Validator using different resource bundles - but <html:errors> works
> OK.
>
> How are you displaying them? If it is with <html:messages> then you
> either need to upgrade to Struts 1.2.8 (just released) or use
> <html:errors>
>
> Niall
>
> On 11/28/05, starki78 <[EMAIL PROTECTED]> wrote:
> > oh yes I use 1.2.7 sorry:-)
> >
> > But yes I can display the messages if I use
> > the default messages:
> > I replace "test" from the message ressources
> >
> >  <message-resources   
> > parameter="com.xinfo.struts.example.strutsDemo.Application"/>
> >
> > and "test" from the bundle attribute
> > in the validation.xml
> >
> > So is this a bug??
> >
> > Nice greetings Christian
> >
> > From      : "Niall Pemberton" [EMAIL PROTECTED]
> > Date      : Mon, 28 Nov 2005 07:45:02 -0000
> > Subject : Re: Bug in Struts Validator?how to move to 1.4
> >
> > > There is no Struts 2.7 - there is a Struts 1.2.7, but if thats the version
> > > you're using, I don't understand why you say you exchanged its validator
> > > with 1.1.4 - - the validator with Struts 1.2.7 is validator 1.1.4 already.
> > >
> > > The other thing, do you have your Application.properties in the right 
> > > place?
> > >
> > > If you use the "default" message resources (i.e. don't specify a "key"), 
> > > can
> > > you display the messages....
> > >
> > > <message-resources
> > > parameter="com.xinfo.struts.example.strutsDemo.Application"/>
> > >
> > > ... then in your validation.xml
> > >
> > >  <field property="qnummer"
> > >                  depends="mask">
> > >                  <arg  position="0" key="validationExample.form.qnummer"/>
> > >                  <arg position="1" name="mask" key="${var:mask}"
> > > resource="false"/>
> > >                   <var>
> > >                     <var-name>mask</var-name>
> > >                     <var-value>^[QXqx0-9]*$</var-value>
> > >                   </var>
> > >           </field>
> > >
> > > Niall
> > >
> > > ----- Original Message -----
> > > From: "starki78" <[EMAIL PROTECTED]>
> > > Sent: Monday, November 28, 2005 7:04 AM
> > >
> > >
> > > Hi!
> > >
> > > Hope you can take a look at the file:
> > >
> > >
> > > Here is the structure of my web-application
> > > that works only then I use the default properties
> > > file, that is not accessed with a bundle
> > > parameter from the validation.xml file.
> > > The result is just that the error messages
> > > that should be displayed are not displayed.
> > >
> > > in my struts (2.7) libraries I exchanged
> > > the commons-validator with
> > > commons-validator-1.1.4.jar.
> > >
> > > <message-resources  key="test"
> > > parameter="com.xinfo.struts.example.strutsDemo.Application"/>
> > >
> > > Properties file with entries=
> > > Application.properties
> > > (I controlled the path)
> > >
> > >
> > > part of the validation.xml
> > >
> > >  <field property="qnummer"
> > >                  depends="mask">
> > >                  <arg  position="0" bundle="test"
> > > key="validationExample.form.qnummer"/>
> > >                  <arg position="1" name="mask" key="${var:mask}"
> > > resource="false"/>
> > >                   <var>
> > >                     <var-name>mask</var-name>
> > >                     <var-value>^[QXqx0-9]*$</var-value>
> > >                   </var>
> > >           </field>
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to