如何使验证码在多个页面上工作?
您是否曾经访问过 myspace 等利用验证码来防止垃圾邮件的网站? 典型的模式是向打开的每个 URL 提出挑战,但该挑战实际上并不属于页面本身,这会导致额外的带宽使用。
因此,如果我同时打开六页并想在每一页上提出一个挑战。 我希望挑战与页面相关,而不是与会话相关。 我如何才能使用 Spring 和/或 Struts 来完成这项工作。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很大程度上取决于您用于渲染页面的内容。 春季MVC? 支柱? 您可以将组件绑定到大多数此类框架中的页面。
您还可以考虑一种解决方法,其中每个页面在会话中以单独的密钥注册其验证码,并让页面检查其自己的值。
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.