Re: best approach to clean parameters using Jsoup

2014-11-20 Thread Lukasz Lenart
Yeah... basically conversion isn't needed in that case ;-) 2014-11-20 15:32 GMT+01:00 JOSE L MARTINEZ-AVIAL : > I jsut used the annotation: > private String parameterArray[] = null; > @TypeConversion(rule= ConversionRule.COLLECTION, type = > ConversionType.CLASS, converter = "com.xxx.y

Re: best approach to clean parameters using Jsoup

2014-11-20 Thread JOSE L MARTINEZ-AVIAL
I jsut used the annotation: private String parameterArray[] = null; @TypeConversion(rule= ConversionRule.COLLECTION, type = ConversionType.CLASS, converter = "com.xxx.yyy.util.conversion. struts2.JSoupConversor") public void setParameterArray(String parameterArray[]) { this.

Re: best approach to clean parameters using Jsoup

2014-11-20 Thread Lukasz Lenart
How did you register it? 2014-11-19 12:55 GMT+01:00 JOSE L MARTINEZ-AVIAL : > Quick question here. I'm working on the approach to use a custom conversor. > It works fine for standard parameters (Just a String), but I'm having > issues when the getter receives a String[] parameters > > private

Re: best approach to clean parameters using Jsoup

2014-11-19 Thread JOSE L MARTINEZ-AVIAL
Quick question here. I'm working on the approach to use a custom conversor. It works fine for standard parameters (Just a String), but I'm having issues when the getter receives a String[] parameters private String parameter = null; @TypeConversion(type = ConversionType.CLASS, converter =

Re: best approach to clean parameters using Jsoup

2014-11-19 Thread JOSE L MARTINEZ-AVIAL
Thanks for the ideas. Overwriting retrieveParameters(ActionContext ac) method seems a good solution, although that would imply doing it to all parameters. While that could be ok, I would like to take a less aggressive approach.One option I'm considering is to user a custom Converter that could take

Re: best approach to clean parameters using Jsoup

2014-11-19 Thread Lukasz Lenart
2014-11-19 4:57 GMT+01:00 JOSE L MARTINEZ-AVIAL : > Hello, > We are using Struts 2.3.16.3 for our application. Due to security > reasons, we need to "clean" the user's input in order to avoid XSS. We are > using JSoup for that, with success( > http://jsoup.org/cookbook/cleaning-html/whitelist-san

Re: best approach to clean parameters using Jsoup

2014-11-19 Thread Christoph Nenning
> Hello, > We are using Struts 2.3.16.3 for our application. Due to security > reasons, we need to "clean" the user's input in order to avoid XSS. We are > using JSoup for that, with success( > http://jsoup.org/cookbook/cleaning-html/whitelist-sanitizer). > > The issues is that we haven't fin

RE: Best approach

2006-06-12 Thread Ronald Traikovich
One way to do is to use lookupdispatch action where each button is assigned it's own method in action class. Do a google search on it or If ya have any books on struts, lookup this action. Another way to do it is to have a hidden variable set when a user clicks a button. This gets set in the form

Re: Best approach to implement date dropdown

2004-12-07 Thread Ben
Hi Carlos I was meant to say ValidatorForm. Cheers Ben On Tue, 7 Dec 2004 09:42:08 -0600, Carlos Cajina <[EMAIL PROTECTED]> wrote: > Good mornign Ben... > > I've settled for the quick & easy solution: there are lots of JavaScript > scripts that can handle date selection boxes :^) The thing is I

Re: Best approach to implement date dropdown

2004-12-07 Thread Bill Siggelkow
If your users are happy with the separate drop-downs for month, date, and year than this approach allows the greatest control. However, since the data is spread between multiple input fields, I think you will find that it is easier to implement validate() yourself instead of trying to use the V

Re: Best approach to implement date dropdown

2004-12-07 Thread Carlos Cajina
Good mornign Ben... I've settled for the quick & easy solution: there are lots of JavaScript scripts that can handle date selection boxes :^) The thing is I don't know much about Velocity :^( As for the validation, with the Validator Framework (VF) you can validate that the dates entered/select