Class HttpTCKServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
ee.jakarta.tck.pages.common.servlet.HttpTCKServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public abstract class HttpTCKServlet extends jakarta.servlet.http.HttpServlet
GenericTCKServlet.java Any test that would normally extend GenericServlet will instead extend this class. This will provide a simple framework from invoking various tests defined as methods within the servlet that extends this class. Created: Wed Jul 31 20:57:16 2002
Version:
%I%
See Also:
  • Field Summary

    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 res)
    A basic implementation of the doGet method which will call invokeTest.
    void
    doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)
    A basic implementation of the doPost method which will call invokeTest.
    void
    init(jakarta.servlet.ServletConfig config)
    init initializes the servlet.
    protected void
    invokeTest(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)
    invokeTest uses reflection to invoke test methods in child classes of this particular class.

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, isSensitiveHeader, 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
  • Constructor Details

    • HttpTCKServlet

      public HttpTCKServlet()
  • Method Details

    • init

      public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException
      init initializes the servlet.
      Specified by:
      init in interface jakarta.servlet.Servlet
      Overrides:
      init in class jakarta.servlet.http.HttpServlet
      Parameters:
      config - - ServletConfig
      Throws:
      jakarta.servlet.ServletException
    • invokeTest

      protected void invokeTest(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws jakarta.servlet.ServletException
      invokeTest uses reflection to invoke test methods in child classes of this particular class.
      Parameters:
      req - - HttpServletRequest
      res - - HttpServletResponse
      Throws:
      jakarta.servlet.ServletException - if an error occurs
    • doGet

      public void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws jakarta.servlet.ServletException, IOException
      A basic implementation of the doGet method which will call invokeTest.
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet
      Parameters:
      req - - HttpServletRequest
      res - - HttpServletResponse
      Throws:
      jakarta.servlet.ServletException - if an error occurs
      IOException - if an IO error occurs
    • doPost

      public void doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws jakarta.servlet.ServletException, IOException
      A basic implementation of the doPost method which will call invokeTest.
      Overrides:
      doPost in class jakarta.servlet.http.HttpServlet
      Parameters:
      req - - HttpServletRequest
      res - - HttpServletResponse
      Throws:
      jakarta.servlet.ServletException - if an error occurs
      IOException - if an IO error occurs