You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ted Husted <hu...@apache.org> on 2004/04/15 01:51:39 UTC

Url Validation Configuration Options

Any thoughts on this one?

http://issues.apache.org/bugzilla/show_bug.cgi?id=28148

"The current url validation in struts (validateUrl method in FieldChecks) only 
uses the default url configuration options.

"I am attaching a patch that will allow the following options to be set in the 
validation.xml file using variables."

<snip/>

-Ted.



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


Re: Url Validation Configuration Options

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
There isn't any dependancy with Commons Bug 28190.

Bug 28190 changes commons UrlValidator to return an "error code" - if that
patch gets accepted into commons validator then we could look at changing
the Struts url validation to take advantage of this feature, but from my
position I was waiting to see if it got accepted before submitting any
changes to struts.


Niall

----- Original Message ----- 
From: "Robert Leland" <rl...@apache.org>
To: "Struts Developers List" <de...@struts.apache.org>
Sent: Thursday, April 15, 2004 3:38 AM
Subject: Re: Url Validation Configuration Options


> Ted Husted wrote:
>
> >Any thoughts on this one?
> >
> >http://issues.apache.org/bugzilla/show_bug.cgi?id=28148
> >
> >"The current url validation in struts (validateUrl method in FieldChecks)
only
> >uses the default url configuration options.
> >
> >"I am attaching a patch that will allow the following options to be set
in the
> >validation.xml file using variables."
> >
> ><snip/>
> >
> >-Ted.
> >
> You'll want to make sure it doesn't depend on:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=28190
>
> It makes available long hidden functionality in Validator and it would
> be good to surface it.
>
>
> ---------------------------------------------------------------------
> 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: Url Validation Configuration Options

Posted by Robert Leland <rl...@apache.org>.
Ted Husted wrote:

>Any thoughts on this one?
>
>http://issues.apache.org/bugzilla/show_bug.cgi?id=28148
>
>"The current url validation in struts (validateUrl method in FieldChecks) only 
>uses the default url configuration options.
>
>"I am attaching a patch that will allow the following options to be set in the 
>validation.xml file using variables."
>
><snip/>
>
>-Ted.
>
You'll want to make sure it doesn't depend on:
http://issues.apache.org/bugzilla/show_bug.cgi?id=28190

It makes available long hidden functionality in Validator and it would 
be good to surface it.


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


Re: Url Validation Configuration Options

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
I've submitted a new patch with your suggestion.

Niall

----- Original Message ----- 
From: "David Graham" <gr...@yahoo.com>
To: "Struts Developers List" <de...@struts.apache.org>
Sent: Thursday, April 15, 2004 4:33 AM
Subject: Re: Url Validation Configuration Options 


> 
> --- Ted Husted <hu...@apache.org> wrote:
> > Any thoughts on this one?
> 
> The patch looks reasonable to me although the conversion from List to
> String[] could be made simpler:
> 
> String[] schemes = new String[schemeList.size()];
> schemeList.toArray(schemes);
> 
> instead of:
> String[] schemes = null; 
> ...
> schemes = (String[])schemeList.toArray(new String[schemeList.size()]);
> 
> or maybe skip the List to array step by using
> StringTokenizer.countTokens().
> 
> David
> 
> > 
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=28148
> > 
> > "The current url validation in struts (validateUrl method in
> > FieldChecks) only
> > uses the default url configuration options.
> > 
> > "I am attaching a patch that will allow the following options to be set
> > in the
> > validation.xml file using variables."
> > 
> > <snip/>
> > 
> > -Ted.
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> > 
> 
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online by April 15th
> http://taxes.yahoo.com/filing.html
> 
> ---------------------------------------------------------------------
> 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: Url Validation Configuration Options

Posted by David Graham <gr...@yahoo.com>.
--- Ted Husted <hu...@apache.org> wrote:
> Any thoughts on this one?

The patch looks reasonable to me although the conversion from List to
String[] could be made simpler:

String[] schemes = new String[schemeList.size()];
schemeList.toArray(schemes);

instead of:
String[] schemes = null; 
...
schemes = (String[])schemeList.toArray(new String[schemeList.size()]);

or maybe skip the List to array step by using
StringTokenizer.countTokens().

David

> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=28148
> 
> "The current url validation in struts (validateUrl method in
> FieldChecks) only
> uses the default url configuration options.
> 
> "I am attaching a patch that will allow the following options to be set
> in the
> validation.xml file using variables."
> 
> <snip/>
> 
> -Ted.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html

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