Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I feed a CAPTCHA image into the servlet page output?

0
Posted

How can I feed a CAPTCHA image into the servlet page output?

0

The difficulty you are facing is that Web browsers see your servlet output as a single HTTP response stream, which is either an HTML document or an image or some other content item. It is not possible to encode the CAPTCHA image content inline into the HTML markup, the HTML img element requires a reference to an image at a separate URL source. The typical request sequence for a CAPTCHA form page would be: • Request CAPTCHA form page (servlet) • Download CAPTCHA form page HTML with image reference • Request CAPTCHA image (servlet) • Download CAPTCHA image as part of the main page load • Submit CAPTCHA form with image reference and human input (servlet) • Servlet checks CAPTCHA image content with human input and sends response • Download HTML success or error page output accordingly It is critical the HTML page, form and image reference must not indicate the “decoded” contents of the CAPTCHA image. But the servlet that checks the CAPTCHA must know the decoded contents and the human input

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123