Announcement Announcement Module
Collapse
No announcement yet.
Using HTTPSession object in Spring Validator Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using HTTPSession object in Spring Validator

    Hi,

    I assume that the following problem must have been encountered by many good folks over here.

    I am submitting a form that has a capcha image. I am using the open source JCaptcha to display the image. So far so good. However when I submit the form I have written customized Validator that validates the form. But to validate the captcha image I need to have a reference to the HttpSession object (that is how it is done using the JCaptcha API).

    So my question is how do I get hold of the HttpSession object in my validator class?

    Please advise if I need a different approach.

    Thanks
    Raj

  • #2
    Any answer...anyone?

    Still waiting for it my friends...

    Comment


    • #3
      This is how I did it

      So I had a work around to this problem.

      I am passing the HttpSession Id to the server from the JSP as a hidden form value. The Validator uses the session Id to validate the text typed by the user.

      Didn't know the solution was so simple.

      Thanks
      Raj

      Comment

      Working...
      X