You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2011/07/19 23:17:13 UTC

Re: [S1] Validator configuration error [bump]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All,

Does anyone have any ideas about my post?

- -chris

On 6/30/2011 11:02 PM, Christopher Schultz wrote:
> All,
> 
> struts-1.3.8 commons-validator-1.3.1
> 
> I recently started using a dynamic form <form-property> attribute
> called "reset". It's documented to allow you to use either "true" or
> "false" or any combination of comma-separated HTTP methods that will
> trigger the form field to be blanked-out in the form before data from
> the request is applied to it.
> 
> From struts-1.3.dtd:
> 
> " <!-- The "form-property" element describes a JavaBean property that
> can be used to configure an instance of a DynaActionForm or a
> subclass thereof.
> 
> [...]
> 
> 
> reset - The flag that indicates when this property should be reset to
> its "initial" value when the form's "reset()" method is called. If
> this is set to "true", the property is always reset when "reset()" is
> called. This can also be set to one or more HTTP methods, such as GET
> or POST. In such a case, the property will be reset only when the
> HTTP method used for the request being processed is included in this 
> attribute's value(s). Multiple HTTP methods can be specified by
> separating them with whitespace or commas.
> 
> [...] --> <!ELEMENT form-property  (set-property*)> <!ATTLIST
> form-property  className      %ClassName;     #IMPLIED> <!ATTLIST
> form-property  initial        CDATA           #IMPLIED> <!ATTLIST
> form-property  name           %PropName;      #REQUIRED> <!ATTLIST
> form-property  reset          %Boolean;       #IMPLIED> <!ATTLIST
> form-property  size           %Integer;       #IMPLIED> <!ATTLIST
> form-property  type           %ClassName;     #REQUIRED>
> 
> The "reset" attribute is declared as "%Boolean;" which is:
> 
> <!ENTITY % Boolean "(true|false|yes|no)">
> 
> This causes the following errors during configuration:
> 
> 2011-06-30 22:49:33,658 [main] ERROR 
> org.apache.commons.digester.Digester- Parse Error at line 18 column
> 86: Attribute "reset" with value "POST" must have a value from the
> list "true false yes no ". org.xml.sax.SAXParseException: Attribute
> "reset" with value "POST" must have a value from the list "true false
> yes no ".
> 
> I checked, and it does not look like there is an updated 
> struts-1.3.x.dtd for me to use with any fix for this.
> 
> Oddly enough, the configuration itself seems to load and work
> properly. Maybe Struts reports SAXParseExceptions but doesn't
> actually stop processing? The configuration works as expected... it
> just has this nasty configuration error whenever we start up.
> 
> First, does anyone see a reason to worry about the error, given that 
> everything seems to actually work.
> 
> Second, since S1 hasn't seen a release since 2008, it is even worth 
> filing a bug and getting it fixed if there isn't likely to be
> another 1.3.x release for a while?
> 
> Thanks, -chris
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4l9FkACgkQ9CaO5/Lv0PCzIQCfYYYJrbO+9u4tjEexFZs4jAIV
iq4AoICuGL1Heci8eqGScMCQgSiVL6TF
=p6wC
-----END PGP SIGNATURE-----

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


Re: [S1] Validator configuration error [bump]

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All,

On 8/3/2011 12:57 PM, Christopher Schultz wrote:
> I can always just patch my local struts-config.dtd file to get rid
> of the error. I'm happy to supply a (nearly trivial) patch to the
> 1.x branch just in case there is another release.

This is what I chose to do.

Unfortunately, DTDs are not very rich in their ability to specify
complex constraints (like arbitrary list of X, Y, Z, etc.) so I had to
change the "reset" attribute from "%Boolean #IMPLIED" to "CDATA IMPLIED".

Fixes the error on startup but does not appear to change the behavior.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5AGqkACgkQ9CaO5/Lv0PAb7ACfforNJAmlXPBfieoOMTNqOgct
s5UAoLRecDujUt3JPUCGaicvg0Tjr5pb
=y+1W
-----END PGP SIGNATURE-----

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


Re: [S1] Validator configuration error [bump]

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave,

On 7/19/2011 5:59 PM, Dave Newton wrote:
> If it works, I wouldn't worry about it.
> 
> I'm not sure if anybody is planning any further 1.x releases, to be 
> honest; maybe if a patch is filed against the ticket someone would 
> apply it, but I'm not sure who (Paul, are you still doing S1 stuff?)

I can always just patch my local struts-config.dtd file to get rid of
the error. I'm happy to supply a (nearly trivial) patch to the 1.x
branch just in case there is another release.

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk45fhUACgkQ9CaO5/Lv0PD6NQCfehO3D0AJNLeLwmkAlAFONMvm
nm0Anj48jRFjPu3mU7HGVzkB1DB+sPFr
=3FHl
-----END PGP SIGNATURE-----

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


Re: [S1] Validator configuration error [bump]

Posted by Dave Newton <da...@gmail.com>.
If it works, I wouldn't worry about it.

I'm not sure if anybody is planning any further 1.x releases, to be
honest; maybe if a patch is filed against the ticket someone would
apply it, but I'm not sure who (Paul, are you still doing S1 stuff?)

Dave

On Tue, Jul 19, 2011 at 5:17 PM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> All,
>
> Does anyone have any ideas about my post?
>
> - -chris
>
> On 6/30/2011 11:02 PM, Christopher Schultz wrote:
>> All,
>>
>> struts-1.3.8 commons-validator-1.3.1
>>
>> I recently started using a dynamic form <form-property> attribute
>> called "reset". It's documented to allow you to use either "true" or
>> "false" or any combination of comma-separated HTTP methods that will
>> trigger the form field to be blanked-out in the form before data from
>> the request is applied to it.
>>
>> From struts-1.3.dtd:
>>
>> " <!-- The "form-property" element describes a JavaBean property that
>> can be used to configure an instance of a DynaActionForm or a
>> subclass thereof.
>>
>> [...]
>>
>>
>> reset - The flag that indicates when this property should be reset to
>> its "initial" value when the form's "reset()" method is called. If
>> this is set to "true", the property is always reset when "reset()" is
>> called. This can also be set to one or more HTTP methods, such as GET
>> or POST. In such a case, the property will be reset only when the
>> HTTP method used for the request being processed is included in this
>> attribute's value(s). Multiple HTTP methods can be specified by
>> separating them with whitespace or commas.
>>
>> [...] --> <!ELEMENT form-property  (set-property*)> <!ATTLIST
>> form-property  className      %ClassName;     #IMPLIED> <!ATTLIST
>> form-property  initial        CDATA           #IMPLIED> <!ATTLIST
>> form-property  name           %PropName;      #REQUIRED> <!ATTLIST
>> form-property  reset          %Boolean;       #IMPLIED> <!ATTLIST
>> form-property  size           %Integer;       #IMPLIED> <!ATTLIST
>> form-property  type           %ClassName;     #REQUIRED>
>>
>> The "reset" attribute is declared as "%Boolean;" which is:
>>
>> <!ENTITY % Boolean "(true|false|yes|no)">
>>
>> This causes the following errors during configuration:
>>
>> 2011-06-30 22:49:33,658 [main] ERROR
>> org.apache.commons.digester.Digester- Parse Error at line 18 column
>> 86: Attribute "reset" with value "POST" must have a value from the
>> list "true false yes no ". org.xml.sax.SAXParseException: Attribute
>> "reset" with value "POST" must have a value from the list "true false
>> yes no ".
>>
>> I checked, and it does not look like there is an updated
>> struts-1.3.x.dtd for me to use with any fix for this.
>>
>> Oddly enough, the configuration itself seems to load and work
>> properly. Maybe Struts reports SAXParseExceptions but doesn't
>> actually stop processing? The configuration works as expected... it
>> just has this nasty configuration error whenever we start up.
>>
>> First, does anyone see a reason to worry about the error, given that
>> everything seems to actually work.
>>
>> Second, since S1 hasn't seen a release since 2008, it is even worth
>> filing a bug and getting it fixed if there isn't likely to be
>> another 1.3.x release for a while?
>>
>> Thanks, -chris
>>
>> ---------------------------------------------------------------------
>>
>>
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk4l9FkACgkQ9CaO5/Lv0PCzIQCfYYYJrbO+9u4tjEexFZs4jAIV
> iq4AoICuGL1Heci8eqGScMCQgSiVL6TF
> =p6wC
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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