File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Form flooding protection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Form flooding protection" Watch "Form flooding protection" New topic

Form flooding protection

Aymeric Levaux

Joined: Apr 01, 2004
Posts: 11
I'm looking for an API that generates image with a random number to display it in a form to check that a real user is filling this form (not a flooder)
Does any body knows about such an API (may be a custom tag ) ?

Thank You !
Pavel Cherkashin
Ranch Hand

Joined: Mar 04, 2005
Posts: 47
Hello, It looks like you should implement it yourself.
I think these passages of code will help you:
The servlet code (in doGet method):

The getImage code - it generates BufferedImage,
which shows the fascia of percents passed in parameters
you can draw there digits, text, and other info,
which will be concerned with Session

Pavel Cherkashin - <br />SCJP, SCWCD, SCDJWS, SCBCD, SCEA, ...<br />
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

For those coming in late, there is also a response in a (closed) duplicate thread here.
I agree. Here's the link:
subject: Form flooding protection
It's not a secret anymore!