| Author |
Best Way to Validate the JSP form by using Java
|
YuenLian Wu
Ranch Hand
Joined: Nov 16, 2005
Posts: 73
|
|
Dear geeks, I have some design questions regarding to the web form. My form has a lot of fields like Customer Name 1, Customer Password 1, Confirm Customer Password 1. I call those as a group. I have around 20 groups of that on my web form because of the user requirement. I feel so annoying that if I have to use the following validation code for each group, The above code is good for few groups, however, I have a lot of such groups and I need to validate one by one. I feel so boring if I just copy paste one set of code and pase it to the jsp and rename the variable names. ANy better way to implement that ? Myriad thanks Transistor [ April 26, 2006: Message edited by: YuenLian Wu ]
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6588
|
|
|
Have you heard of the Struts framework ? Your values will automatically be mapped to variable names in classes. Do look into some example applications that use this.
|
SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
|
|
|
Jakarta Commons Validators is your best bet.
|
 |
 |
|
|
subject: Best Way to Validate the JSP form by using Java
|
|
|