You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Niall Pemberton <ni...@blueyonder.co.uk> on 2004/04/01 20:24:16 UTC

Fw: UrlValidator() takes options - but how?

sending this again as it appears to have lost its way!

Sent: Thursday, April 01, 2004 5:09 PM


> The problem with GenericValidator is that it has a single instance of
> UrlValidator in a static variable, so you can't go changing its
> configuration every time a url is validated in your webapp as it wouldn't
be
> thread safe. In fact if you want the option to configure it on a field by
> field basis then you are going to need to create a new instance of the
> UrlValidator each time - or have some clever mechanism that caches a
> UrlValidator for each field -its a shame the ValidatorAction doesn't do
> that.
>
> Maybe modify FieldChecks.validateUrl() to check if any options/schemes
have
> been set (using <var>) - if they have then instantiate a new UrlValidator,
> otherwise use the default GenericValidator.isUrl().
>
> The other problem, which I usually forget is the javascript - if you allow
> the server side to be configured then maybe the  javascript should also
take
> those options into account (although the date validation only works with
the
> datePatternStrict option in javascript unless its changed in 1.2).
>
> Anyway my opinion is irrelevant as its the "powers that be" that you have
to
> convince to apply any patch you submit :-)
>
> Niall
>
>
> ----- Original Message ----- 
> From: "Adam Hardy" <ah...@cyberspaceroad.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Thursday, April 01, 2004 3:24 PM
> Subject: Re: UrlValidator() takes options - but how?
>
>
> > Thanks for that Niall, you certainly know your stuff.
> >
> > I am thinking, if I change the UrlValidator in the source code, I could
> > submit a patch to allow FieldChecks to set the <var> values from
> > validation.xml.
> >
> > Currently, FieldChecks access UrlValidator via the GenericValidator:
> >
> > if (!GenericValidator.isBlankOrNull(value) &&
> >      !GenericValidator.isUrl(value)) {
> >
> > Should I change this to:
> >
> >       !GenericValidator.isUrl(value, allow2Slashes, noFragments,
> > allowAllSchems)) {
> >
> > and edit GenericValidator accordingly, to pass the options in to
> > UrlValidator.
> >
> > Is that a good idea?
> > Adam
> >
> >
> > On 04/01/2004 02:58 PM Niall Pemberton wrote:
> > > UrlValidator is not the class that is instantiated  by ValidatorAction
> > > because it doesn't know anything about Struts resources - the Struts
> > > FieldChecks.validateUrl() method calls commons GenericValidator which
> > > instantiates the UrlValidator.
> > >
> > > Rather than using the struts FieldChecks.validateUrl(), create you own
> > > version which instantiates the url validator and picks up <var> values
> to
> > > configure it. Something like:
> > >
> > >
> > > <field property="someUrl" depends="myUrlValidator">
> > >       <var><var-name>slashes</var-name>
> > >                 <var-value>true</var-value>
> > >       </var>
> > >       <var><var-name>fragments</var-name>
> > >                 <var-value>true</var-value>
> > >       </var>
> > > </field>
> > >
> > >    public static boolean validateUrl(Object bean,
> > >                                         ValidatorAction va, Field
field,
> > >                                         ActionMessages errors,
> > >                                         HttpServletRequest request) {
> > >
> > >         String value = null;
> > >         if (isString(bean)) {
> > >             value = (String) bean;
> > >         } else {
> > >             value = ValidatorUtils.getValueAsString(bean,
> > > field.getProperty());
> > >         }
> > >         int options = 0;
> > >
> > >         if ("true".equals(field.getVarValue("slashes")))
> > >              options += UrlValidator.ALLOW_2_SLASHES;
> > >
> > >         if ("true".equals(field.getVarValue("fragments")))
> > >              options += UrlValidator.ALLOW_2_SLASHES;
> > >
> > >         UrlValidator urlValidator = new UrlValidator(options);
> > >
> > >         if (!GenericValidator.isBlankOrNull(value) &&
> > > !urlValidator.isValid(value)) {
> > >             errors.add(field.getKey(),
> Resources.getActionMessage(request,
> > > va, field));
> > >             return false;
> > >         } else {
> > >             return true;
> > >         }
> > >     }
> > >
> > > ----- Original Message ----- 
> > > From: "Adam Hardy" <ah...@cyberspaceroad.com>
> > > To: <us...@struts.apache.org>
> > > Sent: Thursday, April 01, 2004 12:17 PM
> > > Subject: UrlValidator() takes options - but how?
> > >
> > >
> > >
> > >>In UrlValidator() in the validator package, one can set various
options
> > >>upon instantiation, such as ALLOW_2_SLASHES or NO_FRAGMENTS.
> > >>
> > >>However it appears from the code in
> > >>ValidatorAction.getValidationClassInstance() that I can't actually set
> > >>these at any point in the Validator framework so that they will be
> > >>picked up when run under struts.
> > >>
> > >>I think I'm looking in the right place in the code.
> > >>
> > >>I was hoping that there would be some method for configuring this via
> > >>validation.xml, but apparently not.
> > >>
> > >>Am I correct?
> > >>
> > >>Thanks
> > >>Adam
> > >>
> > >>-- 
> > >>struts 1.1 + tomcat 5.0.16 + java 1.4.2
> > >>Linux 2.4.20 Debian
> > >>
> > >>
> > >>---------------------------------------------------------------------
> > >>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
> > >
> > >
> >
> >
> > -- 
> > struts 1.2 + tomcat 5.0.19 + java 1.4.2
> > Linux 2.4.20 Debian
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>



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


Re: Fw: UrlValidator() takes options - but how?

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Have you implemented it already? I have implemented about 3/4 of what we 
have discussed. I could stick a patch in bugzilla after finishing it off 
tomorrow, but if you've got the finished article, then you can spare me 
the work :) - I don't mind either way. I'm also looking at another part 
of the UrlValidator that I would like to enhance - see the URL 
Validation thread. I might have a patch for that too soon.

Adam

On 04/01/2004 11:59 PM Niall Pemberton wrote:
> Adam Hardy <ah...@cyberspaceroad.com> wrote
> 
> 
> 
>>I was merely adopting the three optional configuration settings that are
>>used in UrlValidator already. I think your suggestion of a
>>comma-delimited list of schemas sounds easiest, plus it has precedents
>>in other config parameter settings, e.g. list of roles in an action
>>mapping.
> 
> 
> The other suggestion ("var" starting with "scheme") is also straight
> forward -
> there is a getVars() method in Field which returns a Map of all the vars, so
> it would be easy to iterate over them picking out those that start with
> "scheme".
> 
> I'm easy going on which solution to choose - the important thing is to get
> something concrete that implements you configuration suggestion.
> 
> 
>>Re an 'all' option, wouldn't it be easier if no schemas are mentioned or
>>the parameter is absent, then all are allowed?
> 
> 
> FieldChecks currently uses the UrlValidator defaults ("http", "https" and
> "ftp") which
> I think should be the allowed schemes if none are mentioned.
> 
> 
>>Also on the instantiation front, you mean that in FieldChecks, if there
>>are any parameters for validateUrl set, then instantiate a new
>>UrlValidator, otherwise use the GenericValidator.isUrl()?
> 
> 
> Yes.
> 
> I was thinking of openning a bugzilla and sticking a patch up - but I don't
> want
>  to steal your thunder if you'd rather do it.
> 
> Niall
> 
> 
>>Adam
>>
>>On 04/01/2004 10:08 PM Niall Pemberton wrote:
>>
>>>Adam Hardy suggested "allow2slashes", "nofragments" and
> 
> "allowallschemes"
> 
>>>being either true/false
>>>
>>>I think rather than having "allowallschemes", have a "schemes" parameter
>>>which can be either "all" (which sets the allow all schemes option) or a
>>>comma delimited list of valid schemes.
>>>
>>>Alternatively you could have Adam's suggestion plus any <var> that
> 
> starts
> 
>>>with "scheme" is taken to build an array of schemes. Something like:
>>>
>>><field property="someUrl" depends="myUrlValidator">
>>>      <var><var-name>allow2slashes</var-name>
>>>                <var-value>true</var-value>
>>>      </var>
>>>      <var><var-name>nofragments</var-name>
>>>                <var-value>true</var-value>
>>>      </var>
>>>      <var><var-name>allowallschemes</var-name>
>>>                <var-value>false</var-value>
>>>      </var>
>>>      <var><var-name>scheme1</var-name>
>>>                <var-value>http</var-value>
>>>      </var>
>>>      <var><var-name>scheme2</var-name>
>>>                <var-value>ftp</var-value>
>>>      </var>
>>>      <var><var-name>scheme3</var-name>
>>>                <var-value>telnet</var-value>
>>>      </var>
>>></field>
>>>
>>>
>>>Niall
>>>
>>>----- Original Message ----- 
>>>From: "David Graham" <gr...@yahoo.com>
>>>To: "Struts Developers List" <de...@struts.apache.org>
>>>Sent: Thursday, April 01, 2004 8:17 PM
>>>Subject: Re: Fw: UrlValidator() takes options - but how?
>>>
>>>
>>>
>>>
>>>>--- Niall Pemberton <ni...@blueyonder.co.uk> wrote:
>>>>
>>>>
>>>>>Sorry this went to the wrong list, but anyway....
>>>>>
>>>>>Looking at CVS there is a validateUrl() method in the Struts
> 
> FieldChecks
> 
>>>>>class (added in version 1.15) - problem is it uses commons
>>>>>GenericValidator
>>>>>which has a static instance.
>>>>>
>>>>>What do you think about changing this to instantiate a UrlValidator if
>>>>>any
>>>>>configuration parameters have been enetered in validation.xml,
> 
> otherwise
> 
>>>>>use
>>>>>the GenericValidator?
>>>>
>>>>Sounds ok to me but we need to define the variable names the method
>>>>recognizes and will use in UrlValidator configuration.
>>>>
>>>>David
>>
>>-- 
>>struts 1.2 + tomcat 5.0.19 + java 1.4.2
>>Linux 2.4.20 Debian
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 


-- 
struts 1.2 + tomcat 5.0.19 + java 1.4.2
Linux 2.4.20 Debian


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


Re: Fw: UrlValidator() takes options - but how?

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Adam Hardy <ah...@cyberspaceroad.com> wrote


> I was merely adopting the three optional configuration settings that are
> used in UrlValidator already. I think your suggestion of a
> comma-delimited list of schemas sounds easiest, plus it has precedents
> in other config parameter settings, e.g. list of roles in an action
> mapping.

The other suggestion ("var" starting with "scheme") is also straight
forward -
there is a getVars() method in Field which returns a Map of all the vars, so
it would be easy to iterate over them picking out those that start with
"scheme".

I'm easy going on which solution to choose - the important thing is to get
something concrete that implements you configuration suggestion.

> Re an 'all' option, wouldn't it be easier if no schemas are mentioned or
> the parameter is absent, then all are allowed?

FieldChecks currently uses the UrlValidator defaults ("http", "https" and
"ftp") which
I think should be the allowed schemes if none are mentioned.

> Also on the instantiation front, you mean that in FieldChecks, if there
> are any parameters for validateUrl set, then instantiate a new
> UrlValidator, otherwise use the GenericValidator.isUrl()?

Yes.

I was thinking of openning a bugzilla and sticking a patch up - but I don't
want
 to steal your thunder if you'd rather do it.

Niall

>
> Adam
>
> On 04/01/2004 10:08 PM Niall Pemberton wrote:
> > Adam Hardy suggested "allow2slashes", "nofragments" and
"allowallschemes"
> > being either true/false
> >
> > I think rather than having "allowallschemes", have a "schemes" parameter
> > which can be either "all" (which sets the allow all schemes option) or a
> > comma delimited list of valid schemes.
> >
> > Alternatively you could have Adam's suggestion plus any <var> that
starts
> > with "scheme" is taken to build an array of schemes. Something like:
> >
> > <field property="someUrl" depends="myUrlValidator">
> >       <var><var-name>allow2slashes</var-name>
> >                 <var-value>true</var-value>
> >       </var>
> >       <var><var-name>nofragments</var-name>
> >                 <var-value>true</var-value>
> >       </var>
> >       <var><var-name>allowallschemes</var-name>
> >                 <var-value>false</var-value>
> >       </var>
> >       <var><var-name>scheme1</var-name>
> >                 <var-value>http</var-value>
> >       </var>
> >       <var><var-name>scheme2</var-name>
> >                 <var-value>ftp</var-value>
> >       </var>
> >       <var><var-name>scheme3</var-name>
> >                 <var-value>telnet</var-value>
> >       </var>
> > </field>
> >
> >
> > Niall
> >
> > ----- Original Message ----- 
> > From: "David Graham" <gr...@yahoo.com>
> > To: "Struts Developers List" <de...@struts.apache.org>
> > Sent: Thursday, April 01, 2004 8:17 PM
> > Subject: Re: Fw: UrlValidator() takes options - but how?
> >
> >
> >
> >>--- Niall Pemberton <ni...@blueyonder.co.uk> wrote:
> >>
> >>>Sorry this went to the wrong list, but anyway....
> >>>
> >>>Looking at CVS there is a validateUrl() method in the Struts
FieldChecks
> >>>class (added in version 1.15) - problem is it uses commons
> >>>GenericValidator
> >>>which has a static instance.
> >>>
> >>>What do you think about changing this to instantiate a UrlValidator if
> >>>any
> >>>configuration parameters have been enetered in validation.xml,
otherwise
> >>>use
> >>>the GenericValidator?
> >>
> >>Sounds ok to me but we need to define the variable names the method
> >>recognizes and will use in UrlValidator configuration.
> >>
> >>David
>
> -- 
> struts 1.2 + tomcat 5.0.19 + java 1.4.2
> Linux 2.4.20 Debian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>



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


Re: Fw: UrlValidator() takes options - but how?

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
I was merely adopting the three optional configuration settings that are 
used in UrlValidator already. I think your suggestion of a 
comma-delimited list of schemas sounds easiest, plus it has precedents 
in other config parameter settings, e.g. list of roles in an action 
mapping.

Re an 'all' option, wouldn't it be easier if no schemas are mentioned or 
the parameter is absent, then all are allowed?

Also on the instantiation front, you mean that in FieldChecks, if there 
are any parameters for validateUrl set, then instantiate a new 
UrlValidator, otherwise use the GenericValidator.isUrl()?

Adam

On 04/01/2004 10:08 PM Niall Pemberton wrote:
> Adam Hardy suggested "allow2slashes", "nofragments" and "allowallschemes"
> being either true/false
> 
> I think rather than having "allowallschemes", have a "schemes" parameter
> which can be either "all" (which sets the allow all schemes option) or a
> comma delimited list of valid schemes.
> 
> Alternatively you could have Adam's suggestion plus any <var> that starts
> with "scheme" is taken to build an array of schemes. Something like:
> 
> <field property="someUrl" depends="myUrlValidator">
>       <var><var-name>allow2slashes</var-name>
>                 <var-value>true</var-value>
>       </var>
>       <var><var-name>nofragments</var-name>
>                 <var-value>true</var-value>
>       </var>
>       <var><var-name>allowallschemes</var-name>
>                 <var-value>false</var-value>
>       </var>
>       <var><var-name>scheme1</var-name>
>                 <var-value>http</var-value>
>       </var>
>       <var><var-name>scheme2</var-name>
>                 <var-value>ftp</var-value>
>       </var>
>       <var><var-name>scheme3</var-name>
>                 <var-value>telnet</var-value>
>       </var>
> </field>
> 
> 
> Niall
> 
> ----- Original Message ----- 
> From: "David Graham" <gr...@yahoo.com>
> To: "Struts Developers List" <de...@struts.apache.org>
> Sent: Thursday, April 01, 2004 8:17 PM
> Subject: Re: Fw: UrlValidator() takes options - but how?
> 
> 
> 
>>--- Niall Pemberton <ni...@blueyonder.co.uk> wrote:
>>
>>>Sorry this went to the wrong list, but anyway....
>>>
>>>Looking at CVS there is a validateUrl() method in the Struts FieldChecks
>>>class (added in version 1.15) - problem is it uses commons
>>>GenericValidator
>>>which has a static instance.
>>>
>>>What do you think about changing this to instantiate a UrlValidator if
>>>any
>>>configuration parameters have been enetered in validation.xml, otherwise
>>>use
>>>the GenericValidator?
>>
>>Sounds ok to me but we need to define the variable names the method
>>recognizes and will use in UrlValidator configuration.
>>
>>David

-- 
struts 1.2 + tomcat 5.0.19 + java 1.4.2
Linux 2.4.20 Debian


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


Re: Fw: UrlValidator() takes options - but how?

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Adam Hardy suggested "allow2slashes", "nofragments" and "allowallschemes"
being either true/false

I think rather than having "allowallschemes", have a "schemes" parameter
which can be either "all" (which sets the allow all schemes option) or a
comma delimited list of valid schemes.

Alternatively you could have Adam's suggestion plus any <var> that starts
with "scheme" is taken to build an array of schemes. Something like:

<field property="someUrl" depends="myUrlValidator">
      <var><var-name>allow2slashes</var-name>
                <var-value>true</var-value>
      </var>
      <var><var-name>nofragments</var-name>
                <var-value>true</var-value>
      </var>
      <var><var-name>allowallschemes</var-name>
                <var-value>false</var-value>
      </var>
      <var><var-name>scheme1</var-name>
                <var-value>http</var-value>
      </var>
      <var><var-name>scheme2</var-name>
                <var-value>ftp</var-value>
      </var>
      <var><var-name>scheme3</var-name>
                <var-value>telnet</var-value>
      </var>
</field>


Niall

----- Original Message ----- 
From: "David Graham" <gr...@yahoo.com>
To: "Struts Developers List" <de...@struts.apache.org>
Sent: Thursday, April 01, 2004 8:17 PM
Subject: Re: Fw: UrlValidator() takes options - but how?


>
> --- Niall Pemberton <ni...@blueyonder.co.uk> wrote:
> > Sorry this went to the wrong list, but anyway....
> >
> > Looking at CVS there is a validateUrl() method in the Struts FieldChecks
> > class (added in version 1.15) - problem is it uses commons
> > GenericValidator
> > which has a static instance.
> >
> > What do you think about changing this to instantiate a UrlValidator if
> > any
> > configuration parameters have been enetered in validation.xml, otherwise
> > use
> > the GenericValidator?
>
> Sounds ok to me but we need to define the variable names the method
> recognizes and will use in UrlValidator configuration.
>
> David
>
> >
> > Niall
> >
> > ----- Original Message ----- 
> > From: "David Graham" <gr...@yahoo.com>
> > To: "Struts Developers List" <de...@struts.apache.org>
> > Sent: Thursday, April 01, 2004 7:30 PM
> > Subject: Re: Fw: UrlValidator() takes options - but how?
> >
> >
> > > The url validation was added to commons validator but, as you're
> > > discovering, Struts doesn't directly support it yet.  Struts should
> > > provide a hook into this new commons validator feature with predefined
> > > configuration variables like those that have been suggested below
> > (just
> > > like how the maxlength validation uses a "maxlength" variable to
> > configure
> > > itself).
> > >
> > > Patches are always welcome!
> > >
> > > David
> > >
> > > --- Niall Pemberton <ni...@blueyonder.co.uk> wrote:
> > > > sending this again as it appears to have lost its way!
> > > >
> > > > Sent: Thursday, April 01, 2004 5:09 PM
> > > >
> > > >
> > > > > The problem with GenericValidator is that it has a single instance
> > of
> > > > > UrlValidator in a static variable, so you can't go changing its
> > > > > configuration every time a url is validated in your webapp as it
> > > > wouldn't
> > > > be
> > > > > thread safe. In fact if you want the option to configure it on a
> > field
> > > > by
> > > > > field basis then you are going to need to create a new instance of
> > the
> > > > > UrlValidator each time - or have some clever mechanism that caches
> > a
> > > > > UrlValidator for each field -its a shame the ValidatorAction
> > doesn't
> > > > do
> > > > > that.
> > > > >
> > > > > Maybe modify FieldChecks.validateUrl() to check if any
> > options/schemes
> > > > have
> > > > > been set (using <var>) - if they have then instantiate a new
> > > > UrlValidator,
> > > > > otherwise use the default GenericValidator.isUrl().
> > > > >
> > > > > The other problem, which I usually forget is the javascript - if
> > you
> > > > allow
> > > > > the server side to be configured then maybe the  javascript should
> > > > also
> > > > take
> > > > > those options into account (although the date validation only
> > works
> > > > with
> > > > the
> > > > > datePatternStrict option in javascript unless its changed in 1.2).
> > > > >
> > > > > Anyway my opinion is irrelevant as its the "powers that be" that
> > you
> > > > have
> > > > to
> > > > > convince to apply any patch you submit :-)
> > > > >
> > > > > Niall
> > > > >
> > > > >
> > > > > ----- Original Message ----- 
> > > > > From: "Adam Hardy" <ah...@cyberspaceroad.com>
> > > > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > > > Sent: Thursday, April 01, 2004 3:24 PM
> > > > > Subject: Re: UrlValidator() takes options - but how?
> > > > >
> > > > >
> > > > > > Thanks for that Niall, you certainly know your stuff.
> > > > > >
> > > > > > I am thinking, if I change the UrlValidator in the source code,
> > I
> > > > could
> > > > > > submit a patch to allow FieldChecks to set the <var> values from
> > > > > > validation.xml.
> > > > > >
> > > > > > Currently, FieldChecks access UrlValidator via the
> > GenericValidator:
> > > > > >
> > > > > > if (!GenericValidator.isBlankOrNull(value) &&
> > > > > >      !GenericValidator.isUrl(value)) {
> > > > > >
> > > > > > Should I change this to:
> > > > > >
> > > > > >       !GenericValidator.isUrl(value, allow2Slashes, noFragments,
> > > > > > allowAllSchems)) {
> > > > > >
> > > > > > and edit GenericValidator accordingly, to pass the options in to
> > > > > > UrlValidator.
> > > > > >
> > > > > > Is that a good idea?
> > > > > > Adam
> > > > > >
> > > > > >
> > > > > > On 04/01/2004 02:58 PM Niall Pemberton wrote:
> > > > > > > UrlValidator is not the class that is instantiated  by
> > > > ValidatorAction
> > > > > > > because it doesn't know anything about Struts resources - the
> > > > Struts
> > > > > > > FieldChecks.validateUrl() method calls commons
> > GenericValidator
> > > > which
> > > > > > > instantiates the UrlValidator.
> > > > > > >
> > > > > > > Rather than using the struts FieldChecks.validateUrl(), create
> > you
> > > > own
> > > > > > > version which instantiates the url validator and picks up
> > <var>
> > > > values
> > > > > to
> > > > > > > configure it. Something like:
> > > > > > >
> > > > > > >
> > > > > > > <field property="someUrl" depends="myUrlValidator">
> > > > > > >       <var><var-name>slashes</var-name>
> > > > > > >                 <var-value>true</var-value>
> > > > > > >       </var>
> > > > > > >       <var><var-name>fragments</var-name>
> > > > > > >                 <var-value>true</var-value>
> > > > > > >       </var>
> > > > > > > </field>
> > > > > > >
> > > > > > >    public static boolean validateUrl(Object bean,
> > > > > > >                                         ValidatorAction va,
> > Field
> > > > field,
> > > > > > >                                         ActionMessages errors,
> > > > > > >                                         HttpServletRequest
> > > > request) {
> > > > > > >
> > > > > > >         String value = null;
> > > > > > >         if (isString(bean)) {
> > > > > > >             value = (String) bean;
> > > > > > >         } else {
> > > > > > >             value = ValidatorUtils.getValueAsString(bean,
> > > > > > > field.getProperty());
> > > > > > >         }
> > > > > > >         int options = 0;
> > > > > > >
> > > > > > >         if ("true".equals(field.getVarValue("slashes")))
> > > > > > >              options += UrlValidator.ALLOW_2_SLASHES;
> > > > > > >
> > > > > > >         if ("true".equals(field.getVarValue("fragments")))
> > > > > > >              options += UrlValidator.ALLOW_2_SLASHES;
> > > > > > >
> > > > > > >         UrlValidator urlValidator = new UrlValidator(options);
> > > > > > >
> > > > > > >         if (!GenericValidator.isBlankOrNull(value) &&
> > > > > > > !urlValidator.isValid(value)) {
> > > > > > >             errors.add(field.getKey(),
> > > > > Resources.getActionMessage(request,
> > > > > > > va, field));
> > > > > > >             return false;
> > > > > > >         } else {
> > > > > > >             return true;
> > > > > > >         }
> > > > > > >     }
> > > > > > >
> > > > > > > ----- Original Message ----- 
> > > > > > > From: "Adam Hardy" <ah...@cyberspaceroad.com>
> > > > > > > To: <us...@struts.apache.org>
> > > > > > > Sent: Thursday, April 01, 2004 12:17 PM
> > > > > > > Subject: UrlValidator() takes options - but how?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >>In UrlValidator() in the validator package, one can set
> > various
> > > > options
> > > > > > >>upon instantiation, such as ALLOW_2_SLASHES or NO_FRAGMENTS.
> > > > > > >>
> > > > > > >>However it appears from the code in
> > > > > > >>ValidatorAction.getValidationClassInstance() that I can't
> > actually
> >
> === message truncated ===
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway
> http://promotions.yahoo.com/design_giveaway/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>



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


Re: Fw: UrlValidator() takes options - but how?

Posted by David Graham <gr...@yahoo.com>.
--- Niall Pemberton <ni...@blueyonder.co.uk> wrote:
> Sorry this went to the wrong list, but anyway....
> 
> Looking at CVS there is a validateUrl() method in the Struts FieldChecks
> class (added in version 1.15) - problem is it uses commons
> GenericValidator
> which has a static instance.
> 
> What do you think about changing this to instantiate a UrlValidator if
> any
> configuration parameters have been enetered in validation.xml, otherwise
> use
> the GenericValidator?

Sounds ok to me but we need to define the variable names the method
recognizes and will use in UrlValidator configuration.

David

> 
> Niall
> 
> ----- Original Message ----- 
> From: "David Graham" <gr...@yahoo.com>
> To: "Struts Developers List" <de...@struts.apache.org>
> Sent: Thursday, April 01, 2004 7:30 PM
> Subject: Re: Fw: UrlValidator() takes options - but how?
> 
> 
> > The url validation was added to commons validator but, as you're
> > discovering, Struts doesn't directly support it yet.  Struts should
> > provide a hook into this new commons validator feature with predefined
> > configuration variables like those that have been suggested below
> (just
> > like how the maxlength validation uses a "maxlength" variable to
> configure
> > itself).
> >
> > Patches are always welcome!
> >
> > David
> >
> > --- Niall Pemberton <ni...@blueyonder.co.uk> wrote:
> > > sending this again as it appears to have lost its way!
> > >
> > > Sent: Thursday, April 01, 2004 5:09 PM
> > >
> > >
> > > > The problem with GenericValidator is that it has a single instance
> of
> > > > UrlValidator in a static variable, so you can't go changing its
> > > > configuration every time a url is validated in your webapp as it
> > > wouldn't
> > > be
> > > > thread safe. In fact if you want the option to configure it on a
> field
> > > by
> > > > field basis then you are going to need to create a new instance of
> the
> > > > UrlValidator each time - or have some clever mechanism that caches
> a
> > > > UrlValidator for each field -its a shame the ValidatorAction
> doesn't
> > > do
> > > > that.
> > > >
> > > > Maybe modify FieldChecks.validateUrl() to check if any
> options/schemes
> > > have
> > > > been set (using <var>) - if they have then instantiate a new
> > > UrlValidator,
> > > > otherwise use the default GenericValidator.isUrl().
> > > >
> > > > The other problem, which I usually forget is the javascript - if
> you
> > > allow
> > > > the server side to be configured then maybe the  javascript should
> > > also
> > > take
> > > > those options into account (although the date validation only
> works
> > > with
> > > the
> > > > datePatternStrict option in javascript unless its changed in 1.2).
> > > >
> > > > Anyway my opinion is irrelevant as its the "powers that be" that
> you
> > > have
> > > to
> > > > convince to apply any patch you submit :-)
> > > >
> > > > Niall
> > > >
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Adam Hardy" <ah...@cyberspaceroad.com>
> > > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > > Sent: Thursday, April 01, 2004 3:24 PM
> > > > Subject: Re: UrlValidator() takes options - but how?
> > > >
> > > >
> > > > > Thanks for that Niall, you certainly know your stuff.
> > > > >
> > > > > I am thinking, if I change the UrlValidator in the source code,
> I
> > > could
> > > > > submit a patch to allow FieldChecks to set the <var> values from
> > > > > validation.xml.
> > > > >
> > > > > Currently, FieldChecks access UrlValidator via the
> GenericValidator:
> > > > >
> > > > > if (!GenericValidator.isBlankOrNull(value) &&
> > > > >      !GenericValidator.isUrl(value)) {
> > > > >
> > > > > Should I change this to:
> > > > >
> > > > >       !GenericValidator.isUrl(value, allow2Slashes, noFragments,
> > > > > allowAllSchems)) {
> > > > >
> > > > > and edit GenericValidator accordingly, to pass the options in to
> > > > > UrlValidator.
> > > > >
> > > > > Is that a good idea?
> > > > > Adam
> > > > >
> > > > >
> > > > > On 04/01/2004 02:58 PM Niall Pemberton wrote:
> > > > > > UrlValidator is not the class that is instantiated  by
> > > ValidatorAction
> > > > > > because it doesn't know anything about Struts resources - the
> > > Struts
> > > > > > FieldChecks.validateUrl() method calls commons
> GenericValidator
> > > which
> > > > > > instantiates the UrlValidator.
> > > > > >
> > > > > > Rather than using the struts FieldChecks.validateUrl(), create
> you
> > > own
> > > > > > version which instantiates the url validator and picks up
> <var>
> > > values
> > > > to
> > > > > > configure it. Something like:
> > > > > >
> > > > > >
> > > > > > <field property="someUrl" depends="myUrlValidator">
> > > > > >       <var><var-name>slashes</var-name>
> > > > > >                 <var-value>true</var-value>
> > > > > >       </var>
> > > > > >       <var><var-name>fragments</var-name>
> > > > > >                 <var-value>true</var-value>
> > > > > >       </var>
> > > > > > </field>
> > > > > >
> > > > > >    public static boolean validateUrl(Object bean,
> > > > > >                                         ValidatorAction va,
> Field
> > > field,
> > > > > >                                         ActionMessages errors,
> > > > > >                                         HttpServletRequest
> > > request) {
> > > > > >
> > > > > >         String value = null;
> > > > > >         if (isString(bean)) {
> > > > > >             value = (String) bean;
> > > > > >         } else {
> > > > > >             value = ValidatorUtils.getValueAsString(bean,
> > > > > > field.getProperty());
> > > > > >         }
> > > > > >         int options = 0;
> > > > > >
> > > > > >         if ("true".equals(field.getVarValue("slashes")))
> > > > > >              options += UrlValidator.ALLOW_2_SLASHES;
> > > > > >
> > > > > >         if ("true".equals(field.getVarValue("fragments")))
> > > > > >              options += UrlValidator.ALLOW_2_SLASHES;
> > > > > >
> > > > > >         UrlValidator urlValidator = new UrlValidator(options);
> > > > > >
> > > > > >         if (!GenericValidator.isBlankOrNull(value) &&
> > > > > > !urlValidator.isValid(value)) {
> > > > > >             errors.add(field.getKey(),
> > > > Resources.getActionMessage(request,
> > > > > > va, field));
> > > > > >             return false;
> > > > > >         } else {
> > > > > >             return true;
> > > > > >         }
> > > > > >     }
> > > > > >
> > > > > > ----- Original Message ----- 
> > > > > > From: "Adam Hardy" <ah...@cyberspaceroad.com>
> > > > > > To: <us...@struts.apache.org>
> > > > > > Sent: Thursday, April 01, 2004 12:17 PM
> > > > > > Subject: UrlValidator() takes options - but how?
> > > > > >
> > > > > >
> > > > > >
> > > > > >>In UrlValidator() in the validator package, one can set
> various
> > > options
> > > > > >>upon instantiation, such as ALLOW_2_SLASHES or NO_FRAGMENTS.
> > > > > >>
> > > > > >>However it appears from the code in
> > > > > >>ValidatorAction.getValidationClassInstance() that I can't
> actually
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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


Re: Fw: UrlValidator() takes options - but how?

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Sorry this went to the wrong list, but anyway....

Looking at CVS there is a validateUrl() method in the Struts FieldChecks
class (added in version 1.15) - problem is it uses commons GenericValidator
which has a static instance.

What do you think about changing this to instantiate a UrlValidator if any
configuration parameters have been enetered in validation.xml, otherwise use
the GenericValidator?

Niall

----- Original Message ----- 
From: "David Graham" <gr...@yahoo.com>
To: "Struts Developers List" <de...@struts.apache.org>
Sent: Thursday, April 01, 2004 7:30 PM
Subject: Re: Fw: UrlValidator() takes options - but how?


> The url validation was added to commons validator but, as you're
> discovering, Struts doesn't directly support it yet.  Struts should
> provide a hook into this new commons validator feature with predefined
> configuration variables like those that have been suggested below (just
> like how the maxlength validation uses a "maxlength" variable to configure
> itself).
>
> Patches are always welcome!
>
> David
>
> --- Niall Pemberton <ni...@blueyonder.co.uk> wrote:
> > sending this again as it appears to have lost its way!
> >
> > Sent: Thursday, April 01, 2004 5:09 PM
> >
> >
> > > The problem with GenericValidator is that it has a single instance of
> > > UrlValidator in a static variable, so you can't go changing its
> > > configuration every time a url is validated in your webapp as it
> > wouldn't
> > be
> > > thread safe. In fact if you want the option to configure it on a field
> > by
> > > field basis then you are going to need to create a new instance of the
> > > UrlValidator each time - or have some clever mechanism that caches a
> > > UrlValidator for each field -its a shame the ValidatorAction doesn't
> > do
> > > that.
> > >
> > > Maybe modify FieldChecks.validateUrl() to check if any options/schemes
> > have
> > > been set (using <var>) - if they have then instantiate a new
> > UrlValidator,
> > > otherwise use the default GenericValidator.isUrl().
> > >
> > > The other problem, which I usually forget is the javascript - if you
> > allow
> > > the server side to be configured then maybe the  javascript should
> > also
> > take
> > > those options into account (although the date validation only works
> > with
> > the
> > > datePatternStrict option in javascript unless its changed in 1.2).
> > >
> > > Anyway my opinion is irrelevant as its the "powers that be" that you
> > have
> > to
> > > convince to apply any patch you submit :-)
> > >
> > > Niall
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "Adam Hardy" <ah...@cyberspaceroad.com>
> > > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > > Sent: Thursday, April 01, 2004 3:24 PM
> > > Subject: Re: UrlValidator() takes options - but how?
> > >
> > >
> > > > Thanks for that Niall, you certainly know your stuff.
> > > >
> > > > I am thinking, if I change the UrlValidator in the source code, I
> > could
> > > > submit a patch to allow FieldChecks to set the <var> values from
> > > > validation.xml.
> > > >
> > > > Currently, FieldChecks access UrlValidator via the GenericValidator:
> > > >
> > > > if (!GenericValidator.isBlankOrNull(value) &&
> > > >      !GenericValidator.isUrl(value)) {
> > > >
> > > > Should I change this to:
> > > >
> > > >       !GenericValidator.isUrl(value, allow2Slashes, noFragments,
> > > > allowAllSchems)) {
> > > >
> > > > and edit GenericValidator accordingly, to pass the options in to
> > > > UrlValidator.
> > > >
> > > > Is that a good idea?
> > > > Adam
> > > >
> > > >
> > > > On 04/01/2004 02:58 PM Niall Pemberton wrote:
> > > > > UrlValidator is not the class that is instantiated  by
> > ValidatorAction
> > > > > because it doesn't know anything about Struts resources - the
> > Struts
> > > > > FieldChecks.validateUrl() method calls commons GenericValidator
> > which
> > > > > instantiates the UrlValidator.
> > > > >
> > > > > Rather than using the struts FieldChecks.validateUrl(), create you
> > own
> > > > > version which instantiates the url validator and picks up <var>
> > values
> > > to
> > > > > configure it. Something like:
> > > > >
> > > > >
> > > > > <field property="someUrl" depends="myUrlValidator">
> > > > >       <var><var-name>slashes</var-name>
> > > > >                 <var-value>true</var-value>
> > > > >       </var>
> > > > >       <var><var-name>fragments</var-name>
> > > > >                 <var-value>true</var-value>
> > > > >       </var>
> > > > > </field>
> > > > >
> > > > >    public static boolean validateUrl(Object bean,
> > > > >                                         ValidatorAction va, Field
> > field,
> > > > >                                         ActionMessages errors,
> > > > >                                         HttpServletRequest
> > request) {
> > > > >
> > > > >         String value = null;
> > > > >         if (isString(bean)) {
> > > > >             value = (String) bean;
> > > > >         } else {
> > > > >             value = ValidatorUtils.getValueAsString(bean,
> > > > > field.getProperty());
> > > > >         }
> > > > >         int options = 0;
> > > > >
> > > > >         if ("true".equals(field.getVarValue("slashes")))
> > > > >              options += UrlValidator.ALLOW_2_SLASHES;
> > > > >
> > > > >         if ("true".equals(field.getVarValue("fragments")))
> > > > >              options += UrlValidator.ALLOW_2_SLASHES;
> > > > >
> > > > >         UrlValidator urlValidator = new UrlValidator(options);
> > > > >
> > > > >         if (!GenericValidator.isBlankOrNull(value) &&
> > > > > !urlValidator.isValid(value)) {
> > > > >             errors.add(field.getKey(),
> > > Resources.getActionMessage(request,
> > > > > va, field));
> > > > >             return false;
> > > > >         } else {
> > > > >             return true;
> > > > >         }
> > > > >     }
> > > > >
> > > > > ----- Original Message ----- 
> > > > > From: "Adam Hardy" <ah...@cyberspaceroad.com>
> > > > > To: <us...@struts.apache.org>
> > > > > Sent: Thursday, April 01, 2004 12:17 PM
> > > > > Subject: UrlValidator() takes options - but how?
> > > > >
> > > > >
> > > > >
> > > > >>In UrlValidator() in the validator package, one can set various
> > options
> > > > >>upon instantiation, such as ALLOW_2_SLASHES or NO_FRAGMENTS.
> > > > >>
> > > > >>However it appears from the code in
> > > > >>ValidatorAction.getValidationClassInstance() that I can't actually
> > set
> > > > >>these at any point in the Validator framework so that they will be
> > > > >>picked up when run under struts.
> > > > >>
> > > > >>I think I'm looking in the right place in the code.
> > > > >>
> > > > >>I was hoping that there would be some method for configuring this
> > via
> > > > >>validation.xml, but apparently not.
> > > > >>
> > > > >>Am I correct?
> > > > >>
> > > > >>Thanks
> > > > >>Adam
> > > > >>
> > > > >>-- 
> > > > >>struts 1.1 + tomcat 5.0.16 + java 1.4.2
> > > > >>Linux 2.4.20 Debian
> > > > >>
> > > > >>
> > > >
> > >>---------------------------------------------------------------------
> > > > >>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
> > > > >
> > > > >
> > > >
> > > >
> > > > -- 
> > > > struts 1.2 + tomcat 5.0.19 + java 1.4.2
> > > > Linux 2.4.20 Debian
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > >
> > > >
> > >
> >
> >
> === message truncated ===
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway
> http://promotions.yahoo.com/design_giveaway/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>



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


Re: Fw: UrlValidator() takes options - but how?

Posted by David Graham <gr...@yahoo.com>.
The url validation was added to commons validator but, as you're
discovering, Struts doesn't directly support it yet.  Struts should
provide a hook into this new commons validator feature with predefined
configuration variables like those that have been suggested below (just
like how the maxlength validation uses a "maxlength" variable to configure
itself).

Patches are always welcome!

David

--- Niall Pemberton <ni...@blueyonder.co.uk> wrote:
> sending this again as it appears to have lost its way!
> 
> Sent: Thursday, April 01, 2004 5:09 PM
> 
> 
> > The problem with GenericValidator is that it has a single instance of
> > UrlValidator in a static variable, so you can't go changing its
> > configuration every time a url is validated in your webapp as it
> wouldn't
> be
> > thread safe. In fact if you want the option to configure it on a field
> by
> > field basis then you are going to need to create a new instance of the
> > UrlValidator each time - or have some clever mechanism that caches a
> > UrlValidator for each field -its a shame the ValidatorAction doesn't
> do
> > that.
> >
> > Maybe modify FieldChecks.validateUrl() to check if any options/schemes
> have
> > been set (using <var>) - if they have then instantiate a new
> UrlValidator,
> > otherwise use the default GenericValidator.isUrl().
> >
> > The other problem, which I usually forget is the javascript - if you
> allow
> > the server side to be configured then maybe the  javascript should
> also
> take
> > those options into account (although the date validation only works
> with
> the
> > datePatternStrict option in javascript unless its changed in 1.2).
> >
> > Anyway my opinion is irrelevant as its the "powers that be" that you
> have
> to
> > convince to apply any patch you submit :-)
> >
> > Niall
> >
> >
> > ----- Original Message ----- 
> > From: "Adam Hardy" <ah...@cyberspaceroad.com>
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Sent: Thursday, April 01, 2004 3:24 PM
> > Subject: Re: UrlValidator() takes options - but how?
> >
> >
> > > Thanks for that Niall, you certainly know your stuff.
> > >
> > > I am thinking, if I change the UrlValidator in the source code, I
> could
> > > submit a patch to allow FieldChecks to set the <var> values from
> > > validation.xml.
> > >
> > > Currently, FieldChecks access UrlValidator via the GenericValidator:
> > >
> > > if (!GenericValidator.isBlankOrNull(value) &&
> > >      !GenericValidator.isUrl(value)) {
> > >
> > > Should I change this to:
> > >
> > >       !GenericValidator.isUrl(value, allow2Slashes, noFragments,
> > > allowAllSchems)) {
> > >
> > > and edit GenericValidator accordingly, to pass the options in to
> > > UrlValidator.
> > >
> > > Is that a good idea?
> > > Adam
> > >
> > >
> > > On 04/01/2004 02:58 PM Niall Pemberton wrote:
> > > > UrlValidator is not the class that is instantiated  by
> ValidatorAction
> > > > because it doesn't know anything about Struts resources - the
> Struts
> > > > FieldChecks.validateUrl() method calls commons GenericValidator
> which
> > > > instantiates the UrlValidator.
> > > >
> > > > Rather than using the struts FieldChecks.validateUrl(), create you
> own
> > > > version which instantiates the url validator and picks up <var>
> values
> > to
> > > > configure it. Something like:
> > > >
> > > >
> > > > <field property="someUrl" depends="myUrlValidator">
> > > >       <var><var-name>slashes</var-name>
> > > >                 <var-value>true</var-value>
> > > >       </var>
> > > >       <var><var-name>fragments</var-name>
> > > >                 <var-value>true</var-value>
> > > >       </var>
> > > > </field>
> > > >
> > > >    public static boolean validateUrl(Object bean,
> > > >                                         ValidatorAction va, Field
> field,
> > > >                                         ActionMessages errors,
> > > >                                         HttpServletRequest
> request) {
> > > >
> > > >         String value = null;
> > > >         if (isString(bean)) {
> > > >             value = (String) bean;
> > > >         } else {
> > > >             value = ValidatorUtils.getValueAsString(bean,
> > > > field.getProperty());
> > > >         }
> > > >         int options = 0;
> > > >
> > > >         if ("true".equals(field.getVarValue("slashes")))
> > > >              options += UrlValidator.ALLOW_2_SLASHES;
> > > >
> > > >         if ("true".equals(field.getVarValue("fragments")))
> > > >              options += UrlValidator.ALLOW_2_SLASHES;
> > > >
> > > >         UrlValidator urlValidator = new UrlValidator(options);
> > > >
> > > >         if (!GenericValidator.isBlankOrNull(value) &&
> > > > !urlValidator.isValid(value)) {
> > > >             errors.add(field.getKey(),
> > Resources.getActionMessage(request,
> > > > va, field));
> > > >             return false;
> > > >         } else {
> > > >             return true;
> > > >         }
> > > >     }
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Adam Hardy" <ah...@cyberspaceroad.com>
> > > > To: <us...@struts.apache.org>
> > > > Sent: Thursday, April 01, 2004 12:17 PM
> > > > Subject: UrlValidator() takes options - but how?
> > > >
> > > >
> > > >
> > > >>In UrlValidator() in the validator package, one can set various
> options
> > > >>upon instantiation, such as ALLOW_2_SLASHES or NO_FRAGMENTS.
> > > >>
> > > >>However it appears from the code in
> > > >>ValidatorAction.getValidationClassInstance() that I can't actually
> set
> > > >>these at any point in the Validator framework so that they will be
> > > >>picked up when run under struts.
> > > >>
> > > >>I think I'm looking in the right place in the code.
> > > >>
> > > >>I was hoping that there would be some method for configuring this
> via
> > > >>validation.xml, but apparently not.
> > > >>
> > > >>Am I correct?
> > > >>
> > > >>Thanks
> > > >>Adam
> > > >>
> > > >>-- 
> > > >>struts 1.1 + tomcat 5.0.16 + java 1.4.2
> > > >>Linux 2.4.20 Debian
> > > >>
> > > >>
> > >
> >>---------------------------------------------------------------------
> > > >>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
> > > >
> > > >
> > >
> > >
> > > -- 
> > > struts 1.2 + tomcat 5.0.19 + java 1.4.2
> > > Linux 2.4.20 Debian
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> > >
> >
> 
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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