0 Replies Latest reply on Mar 4, 2008 4:39 PM by zergspirit

    Captcha not working

    zergspirit

      Hi,


      I can't manage to get Seam captcha working. I guess it's a configuration problem, though, I couldn't get it to work.
      All I've done, following seam doc, is to add those lines in my web.xml:


           <servlet>
               <servlet-name>Seam Resource Servlet</servlet-name>
               <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
           </servlet>
          
           <servlet-mapping>
               <servlet-name>Seam Resource Servlet</servlet-name>
               <url-pattern>/seam/resource/*</url-pattern>
           </servlet-mapping>



      And then I've made a very simple page to test, but no image is appearing.


      <h:form>
      <h:graphicImage value="/seam/resource/captcha"/>
      <h:inputText id="verifyCaptcha" value="#{captcha.response}" required="true">
         <s:validate />
      </h:inputText>
      <h:message for="verifyCaptcha"/>
      <h:commandButton value ="test"/>
      </h:form>



      Whenever I hit the commandButton, the validation seems to work since it's telling me I've got the wrong answer when I try to type a random text.


      I guess it might be the image url which is wrong, but I don't know what to put instead.