views:

172

answers:

1

Ever visit a website such as myspace where they leverage CAPTCHA to prevent spam? The typical pattern is to present a challenge to each URL that is opened, yet the challenge doesn't actually belong to the page itself which causes additional bandwidth usage.

So, if I open up six pages at the same time and want to present a challenge on each page. I want the challenge to be tied to the page and not to the session. How can I make this work with Spring and/or Struts.

A: 

This depends largely on what you are using for rendering the pages. Spring MVC? Struts? You can tie components to pages in most of these frameworks.

You can also maybe think of a workaround where each page registers his captcha in the session in a seperate key, and have the page check against it's own value.

Rolf