If you go dynamic, note that your JSP is just going to write an <img tag which has a src pointing to a servlet that will generate the image. You can use a session variable to contain the code.
I suggest you get the JSP registration page generation working with a static image first.
The topic of serving images has been discussed frequently around here, generally in the context of graphics generated from database results but the principle is the same.
Originally posted by William Brogden:
You are going to have to display an image either selected from a set of static image files on the server Bill
I think I'm gonna go with this option thanks Bill..What about the speed ? Does it make any difference from one to another ? (on the fly & static) Which one is faster you think ?
Also google for "java captcha" for lots of links.
What about the speed ?
Sigh - another person worrying about speed at the wrong point.
Considering all of the time consuming operations involved in a servlet, the difference between serving a static image file and building one on the fly would be very hard to measure. "Premature optimization is the root of all evil." Get the code correct and clear first.
There aren't may rules that have been put into place here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Originally posted by kees ... voogd:
you can download a simple one here:
thanks kj : ) bu the link is broken