Hey - it's me again. I was close last time and now I have the answer, so I figured I post it to save time for others. Turned out this was more-less
tomcat related, and depending on how tomcat is setup could affect anybody.
Captcha is written thru Sun's javax.imageio.ImageIO which in turn uses a file system to persist temp info. That means it needs to write the temporary image somewhere before it displays it. I just didn't know where.. Tomcat internally must be somehow setting temp directory by calling setCacheDirectory, so ImageIO in turns is trying to write it to <tomcathome>/tmp (on Linux which is what I use). My tomcat temp directory exists, but in /tmp/tomcat, so doing a symbolic link like this:
cd <tomcathome>
ln -s /tmp/tomcat tmp
took care of the problem! Now it's all working :-)
[originally posted on jforum.net by azimowski]