• Post Reply Bookmark Topic Watch Topic
  • New Topic

Captcha image not working  RSS feed

 
Vijendra Babar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
Has any one used Captcha image. These images are generally used for authentication.

I am using SimpleCaptcha which by default gives me image containing 5 characters. I have taken one session variable which is used to store these characters. But the session variable contain 6 character.

So while authenticating it always give me invalid match.

If any one has idea about it, please let me know.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But the session variable contain 6 character.

Why does it contain 6 characters?
 
Vijendra Babar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats what I am not able to find.

Image contains only 5 charaters & the session variable contains string with 6 character.

I have sorted this problem by eliminating the last charater while authenticating. But not satisfied with this solution.

Actually we can set parameters in web.xml file (I am using JSP for it) which specifies that to set 5 charaters

Following is the code.

<init-param>
<param-name>cap.char.arr.l</param-name>
<param-value>5</param-value>
</init-param>

But this doesn't work. Infact there are other parameter which I am trying to set. But none of them is working. This was regarding SimpleCaptcha

Now if I use CaptchaServlet & set parameters for it then it works. But no image is created. But if I check the session variable value it contains 5 characters but no image is created for it.

I really dont know whats problem in both i.e. SimpleCaptcha & CaptchaServlet

I think I am missing something.
Can you please sort out it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!