i need idea how to make security code in jsp..
when we register to any website, mostly we need to fill
the security code that appear at the registration form page.
so how can,I as a developer to do that security code?
this is the example of security code:
how can i call that image to my form?
and it pick randomly from the database
You have to write appropriate code in your registration jsp.
1. Generate a random text or number.
2. Push (save) it to cookies or session.
3. Draw an image into buffer and save it. - Graphics - java.awt
4. Use img tag to set src attribute with path of newly created image.
5. Add a text tag (say spamtext) near to the image.
After form is filled up and user hit submit then,
1. Read the value of spamtext and compare it with the value which
was pushed (saved) into cookies or session.
I hope, you will get it.