my question is how to validate the user inputs
As a example how guarantee that name doesn't include any numbers.....age only include numbers?
is there a any validation API in java?
Albareto McKenzie
Ranch Hand
Joined: Apr 08, 2009
Posts: 268
posted
0
You can validate it in Java, of course, but as it's a Server side language you will have to send the info to the server, validate it in Java and then send to the browser the appropiate data (registration succeed or not succeed or whatever). Fos simple validations you can use javascript, before submitting validate that the age is a number and is not !@rt, for example.
anarkali perera
Ranch Hand
Joined: Sep 10, 2009
Posts: 237
posted
0
i am not familior with javascript.can you give me the good link for javascript validation?
Be aware that JavaScript validation on the client is not a suitable replacement for validation on the server. Your data must always be validated on the server regardless of whether you perform client-side validation or not.
As this is primarily a query regarding validation libraries, I've moved it to the Open Source Projects forum.
Now there is a way to authentication machanism.
now i need these ones
1)how avoid sql injection when login?
2)good encription for password and how to save encripted data in mysql ??
3) is there any other ways to improve the quality of this code?
Albareto McKenzie
Ranch Hand
Joined: Apr 08, 2009
Posts: 268
posted
0
just create a method private boolean validate(String element) and check that your String doesn't contain any strange character...
I have problem on server side validation.
user type his username and password on browser.
so if i use server on encription to password the password hacker can get the password between client machine and server.because client machine to server password goes a normal text.
is it true?
If you have questions about errors you're getting, then it would be extremely helpful to know what those errors are. Post them in full, along with detailed information what you're doing.
first i go to the
C:\Program Files\Java\jdk1.6.0\bin using command line .
then i type this on cmd.
keytool -genkey -alias tomcat -keyalg RSA
then it ask the password.I give the password and i give changeit as mentioned in site.
then it ask re type password and i give changeit again.
then it ask "What is your first and last name " ,"What is the name of your organizational unit",What is the name of your organization?................i think it never ends?