Jsp code for validating username and password Zambian chat rooms

Hello, I have created 1 html page which contain username, password & submit button.in my oracle10G database already contain table name admin which has name, password. so hw could i check whether the username & password is correct or not..correct then it goes to another page.Dear Experts, I have to implement a validation for password using JSP/Servlet where: 1. In case of server side same you need to check it alpha numeric and also check it with the password and fname by get the value of these below code for example to check alpha value public static boolean is Alpha(String val) also add for numeric value like if ((chr Array[i] function validate Password Using Reg Exp() function validate Password() </script> <input type="submit" onclick="javascript:validate Password Using Reg E xp()"/>" id="ctl00_m_m_i_ctl00_gr_ctl13_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3488158" / validations you also have one excelent tools in java script called as a j Query which is very dynamic and you can customize the msg when validations fails etc.. Software Engineer." id="ctl00_m_m_i_ctl00_gr_ctl15_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3491546" / Hi, validations you also have one excelent tools in java script called as a j Query which is very dynamic and you can customize the msg when validations fails etc.. for client side validation you have to use Java class that may be servlet for sending response to client. So plz don't put reply like this, better if u can put some pseudo code or some links. First Name, Last Name and User ID should not be a part of Password. I want to validate this from server as well as client side. In java script check password fields 's lost focus if the validation is ok or not. for client side validation you can use javascript or j Query, j Query is a fast and concise Java Script Library that simplifies HTML document traversing. Minimum 8 digits I am not using any framework, so please don’t suggest Struts validation. As the number of validations are more you can use case / if else loops. As the number of validations are more you can use case / if else loops. I want a help in validation script code could you please? First Name, Last Name and User ID should not be a part of Password. something like Assuming ur textfields are named as per conventions.... Minimum 8 digits regarding ur requirements, you can write a javascript function on the page that'll be called on the click of the submit button.. Samir You can write a Servlet using substring function to check all your validations and transfer to the Home Page only when the password is valid as per the validation script written by you. Regards, VR Venugopal Rao" id="ctl00_m_m_i_ctl00_gr_ctl01_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3487466" / Dear Samir, You can write a Servlet using substring function to check all your validations and transfer to the Home Page only when the password is valid as per the validation script written by you. Regards, VR Venugopal Rao Thank you for response and showing intrest. Minimum 8 digits regarding ur requirements, you can write a javascript function on the page that'll be called on the click of the submit button..(2)In JSP, Instead of finding whether there is any row exist with userid and pwd, using the userid, get the password.

follow the see for the validations concept in that site. no need to implement this again you can just use it as such. follow the see for the validations concept in that site. no need to implement this again you can just use it as such. even for simpilicty tou can use jsp scrip-let in jsp for java code for server side vaidation.<% /* validation java code */% Hello, for client side validation you can use javascript or j Query, j Query is a fast and concise Java Script Library that simplifies HTML document traversing. So plz don't put reply like this, better if u can put some pseudo code or some links." id="ctl00_m_m_i_ctl00_gr_ctl19_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3495189" / Dear Deepak, Sorry for writing this... </title> <script language=" Java Script"> function validate Password Using Reg Exp() function validate Password() </script> </head> <body> <input type="submit" onclick="javascript:validate Password Using Reg E xp()"/> </body> </html>" id="ctl00_m_m_i_ctl00_gr_ctl09_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3488095" / Hope my post would helpful to you. = -1) ) }" id="ctl00_m_m_i_ctl00_gr_ctl15_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3488183" / var str Password = "123456fsfd"; var int Digits Counter = 0; for(var i=0; i<str Password.length; i ) if(int Digits Counter < 8) }" id="ctl00_m_m_i_ctl00_gr_ctl17_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3491563" /Use the regex pattern to your program......As i replied in previous post..u can now do other validations like no of DIGITS should minimum 8 etc.. Regards, Samir" id="ctl00_m_m_i_ctl00_gr_ctl13_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3488138" / var f Name = " FN"; var l Name = " LN"; var user Id =" UId"; var str Password = "abcd1234ABCDLNFNUId"; if( (str Password.index Of(f Name) ! if(Text().matches("^[_A-Za-z0-9-] (\.[_A-Za-z0-9-] )*@[A-Za-z0-9-] (\.[A-Za-z0-9-] )*(\.[_A-Za-z0-9-] )")) .... ..." id="ctl00_m_m_i_ctl00_gr_ctl19_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3491582" / As you are not using any frame work, you can do the validation in Servlet class.In this document, we have discussed Java Script Form Validation using a sample registration form.The tutorial explores Java Script validation on submit with detail explanation.I'm going to guess that you'll find the problem is in the line: Hi Joseph When you are declaring/writing in JSP scriplet that translated in service method while JSP to servlet translation.If you would like to declare method then you can use JSP declarative such as sorry for bordering you guys my code connect to the database perfectly, but it is not validating the input from the login form rather with or without username/password,the jsp will still forward to the welcome page.Regards, Utsav <head> <title> Java Script Password Validation Script ................!!!!</title> <script language=" Java Script"> function validate Password Using Reg Exp() function validate Password() </script> </head> <body> <input type="submit" onclick="javascript:validate Password Using Reg E xp()"/> </body> </html>" id="ctl00_m_m_i_ctl00_gr_ctl07_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3488081" / <head> <title> Java Script Password Validation Script ................!!!!Thx Ajuba" id="ctl00_m_m_i_ctl00_gr_ctl11_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3488121" /I am looking in to this. first get the username and password withthe Parameter("username") Parameter("password") use the String Utils class available in org.apache.String Utils class, which has methods that help you to perform the validations.

Jsp code for validating username and password