Class SimpleCaptchaServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
nl.captcha.servlet.SimpleCaptchaServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
Direct Known Subclasses:
ChineseCaptchaServlet, StickyCaptchaServlet

public class SimpleCaptchaServlet extends jakarta.servlet.http.HttpServlet
Generates, displays, and stores in session a 200x50 CAPTCHA image with sheared black text, a solid dark grey background, and a straight, slanted red line through the text.
Author:
James Childers
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected int
     

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp)
     
    void
     

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service, service

    Methods inherited from class jakarta.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _width

      protected int _width
    • _height

      protected int _height
  • Constructor Details

    • SimpleCaptchaServlet

      public SimpleCaptchaServlet()
  • Method Details

    • init

      public void init() throws jakarta.servlet.ServletException
      Overrides:
      init in class jakarta.servlet.GenericServlet
      Throws:
      jakarta.servlet.ServletException
    • doGet

      public void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet
      Throws:
      jakarta.servlet.ServletException
      IOException