java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.jboss.as.test.integration.security.common.servlets.SimpleServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
Direct Known Subclasses:
SimpleSecuredServlet

@WebServlet(urlPatterns="/unsecured") public class SimpleServlet extends jakarta.servlet.http.HttpServlet
A simple servlet that just writes back a string.
Author:
Josef Cacek
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of a request parameter (parsed as a boolean), which says if a session should be created.
    static final String
    The String returned in the HTTP response body.
    static final String
     

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp)
    Writes simple text response.

    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, init, log, log

    Methods inherited from class java.lang.Object

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

    • SERVLET_PATH

      public static final String SERVLET_PATH
      See Also:
    • RESPONSE_BODY

      public static final String RESPONSE_BODY
      The String returned in the HTTP response body.
      See Also:
    • CREATE_SESSION_PARAM

      public static final String CREATE_SESSION_PARAM
      Name of a request parameter (parsed as a boolean), which says if a session should be created.
      See Also:
  • Constructor Details

    • SimpleServlet

      public SimpleServlet()
  • Method Details

    • doGet

      protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException
      Writes simple text response.
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet
      Parameters:
      req -
      resp -
      Throws:
      jakarta.servlet.ServletException
      IOException
      See Also:
      • HttpServlet.doGet(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)