• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

Hi, i am trying to use jcaptcha on Resin. I found an example which told me to install ehcache. I am not using a configuration file, so it is using the ehcache-failsafe.xml in the jar file.

My captcha class works on tomcat, but doesn’t work on Resin. I don’t know if this is jcaptcha’s fault or ehcache, so i am asking both projects.

My code can be found here: http://cvs.sourceforge.net/viewcvs.py/mortiforo/mortiforo/WEB-INF/src/mortiforo/util/CaptchaServiceSingleton.java?rev=1.1&view=auto This file holds the singleton initialization

http://cvs.sourceforge.net/viewcvs.py/mortiforo/mortiforo/WEB-INF/src/mortiforo/util/ImageCaptchaServlet.java?rev=1.1&view=auto This is the code that generates the captcha image itself

Here is the code that i am using in the servlet to handle the response to a captcha challenge, found in http://cvs.sourceforge.net/viewcvs.py/mortiforo/mortiforo/WEB-INF/src/mortiforo/RegisterNewUser.java?rev=1.13&view=auto

String jcaptcha_validation = request.getParameter(“j_captcha_response”); String language = request.getParameter(“language_list”); boolean isResponseCorrect =false; String captchaId = request.getSession().getId(); try { isResponseCorrect = CaptchaServiceSingleton.getInstance().validateResponseForID(captchaId, jcaptcha_validation).booleanValue(); } catch (CaptchaServiceException e) { e.printStackTrace(); } if (!isResponseCorrect) { //code to deny registration }

Relevant web.xml entries in http://cvs.sourceforge.net/viewcvs.py/mortiforo/mortiforo/WEB-INF/web.xml?rev=1.38&view=auto:

jcaptcha mortiforo.util.ImageCaptchaServlet jcaptcha /jcaptcha

Like i said, everything works on tomcat. I don’t have any errors on the resin logs. The only warning i get is that i don’t have a configuration file, but this warning happens on tomcat too and it works.

I am using jcaptcha-all-1.0-RC2.0.1.jar and ehcache 1.1.

Please, any help would be greatly appreciated! Sourceforge Ticket ID: 1183294 - Opened By: espectro - 14 Apr 2005 20:08 UTC

Comments

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira