Kaptcha Image is not getting displayed on linux machine..

23 views
Skip to first unread message

Raghu1

unread,
Feb 10, 2008, 9:02:24 PM2/10/08
to kaptcha
Hello, I have setup Kaptcha as given in example web app.
Kaptcha is working fine on Tomcat 5.5 hosted on Windows machine but
kaptcha image is not getting displayed on Tomcat 5.5 hosted on Linux
machine.

Not sure what can be issue here.

Pl. suggest some suggestion.

Thanks

Raghu1

unread,
Feb 10, 2008, 10:31:48 PM2/10/08
to kaptcha
Okay, This problem is coming because I don't have X server on Linux
machine.

I was searching through Simple Captcha forum and found below
solution..This might need a new build...

Comment the following lines in DefaultWordRenderer.renderWord()

//GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
//GraphicsDevice gd = ge.getDefaultScreenDevice();
//GraphicsConfiguration gc = gd.getDefaultConfiguration();

JDK1.5 doesn't need GraphicEnvironment to create bufferedImage.

Thanks
Raghu

latc...@gmail.com

unread,
Feb 14, 2008, 12:18:32 PM2/14/08
to kaptcha
You are using a very old version of Kaptcha. Try a newer version.

jon

Raghu1

unread,
Feb 18, 2008, 10:04:42 PM2/18/08
to kaptcha
I am using kaptcha 2.0
but i didn't set -Djava.awt.headless=true

I am developing my application on windows platform but I have linux
based webhosting..so problem in coming only on hosted env.
I am not much familiar with linux...

Which file to set this -Djava.awt.headless=true ?

Is there any alternate for this? i have jdk1.5 installed on linux
machine?
Reply all
Reply to author
Forward
0 new messages