开发者

Captcha code makes all html elements disappear on jsp page

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 ev开发者_开发技巧erything 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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜