Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validation Extended Ascii chars

 
M Pk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have to show an error message if the user enters an
extended ascii char (ascii code >127) in any of the fields on form submission.
I am using struts/websphere 6.1.
I don't want to specify each form field in validation xml.

Any help is appreciated.

MP
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want to validate each field then you'll need to do something like hook into the validation process via a custom request processor (if you're using Struts 1) or an interceptor or default validation method (Struts 2). Or do something through a filter, regardless of which Struts version.
 
M Pk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i was thinking of Filter. But how to rediect to same page with error message?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic