验证码使jsp页面上的所有html元素消失
我得到了这个java验证码: http://codepaste.net/a4vxzh 我想将代码生成的图像放在 jsp 页面中,但是当我在页面中的任何位置编写代码时,只有图像出现,而页面上应该出现的所有内容都会消失。我考虑过使用 pirnt.out 在代码中编写 html 元素,但我确信有一种我想不到的更好的方法。提前感谢您的帮助。
i got this java captcha code: http://codepaste.net/a4vxzh
I want to put the image the code generates in my jsp page, but when I write the code anywhere in the page, only the image appears and everything thats supposed to be on the page disappears. I thought about writing the html elemenets inside the code using pirnt.out, but I'm sure there is a better way that I can not think of. Thanks for your help in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您确实应该使用广泛使用的验证码系统,而不是自定义系统。许多链接都指出,使用圆圈或类似的东西来模糊文本的验证码并不是一个很好的方法(例如,请参见 此处)。
请改用 reCAPTCHA,它用途广泛、安全且易于使用。另外,它很震撼,有助于对旧书进行计数。 此处介绍了如何将其与 Java/ JSP。
You should really use a wide-used captcha system, instead of a custom one. Many links point to the fact that captcha using circles or things like that to obscure the text are not a very good way to do it (see for example here).
Use reCAPTCHA instead, it's wide-used, secure, and easy to use. Plus, it rocks, and helps to numerize old books. Here is how to use it with Java/JSP.
我猜你偷的代码[;)]正在写入你的输出..
它应该被称为不同的请求,并且不包含在您的代码中..
让它单独运行,不要将其包含在您的代码中。当您需要显示验证码时,请将其包含在定义明确的容器(如 div 或 iframe)中,并从那里请求它。
that code you stole [ ;) ] is writing to your output I guess..
its supposed to be called as a different request and not to be included in your code..
keep it running individually, don't include it in your code.. when you require to show a captcha, enclose it in a well defined container like div or iframe and request it from there.