Class ServletNoVehicle

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.sun.ts.tests.common.vehicle.none.proxy.ServletNoVehicle
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public abstract class ServletNoVehicle extends jakarta.servlet.http.HttpServlet
This is the target servlet for appclient tests that use a proxy to invoke the client test class injected into a subclass of this servlet.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     

    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)
    GET methods are test method invocations.
    void
    doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)
    POST methods are test method setup invocations.
    void
    init(jakarta.servlet.ServletConfig config)
    No usage of this setup method currently.
    protected abstract RemoteStatus
    Override this method to implement the test method invocation.
    protected RemoteStatus
    setup(String[] args)
    Default setup does nothing for those existing tests that do not require setup.
    protected RemoteStatus
    setup(String[] args, Properties props)
     

    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
  • Field Details

    • testName

      protected String testName
  • Constructor Details

    • ServletNoVehicle

      public ServletNoVehicle()
  • Method Details

    • init

      public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException
      No usage of this setup method currently.
      Specified by:
      init in interface jakarta.servlet.Servlet
      Overrides:
      init in class jakarta.servlet.http.HttpServlet
      Parameters:
      config - the ServletConfig object that contains configuration information for this servlet
      Throws:
      jakarta.servlet.ServletException
    • doGet

      public void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws jakarta.servlet.ServletException, IOException
      GET methods are test method invocations. The test name is passed in as the 'test' parameter.
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet
      Parameters:
      req - an HttpServletRequest object that contains the request the client has made of the servlet
      res - an HttpServletResponse object that contains the response the servlet sends to the client
      Throws:
      jakarta.servlet.ServletException - on test invocation failure
      IOException - is not thrown
    • doPost

      public void doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws jakarta.servlet.ServletException, IOException
      POST methods are test method setup invocations. This implementation is based on expecting a single serialized array of arguments to be passed in. The test name is passed in as the last element of the array.
      Overrides:
      doPost in class jakarta.servlet.http.HttpServlet
      Parameters:
      req - an HttpServletRequest object that contains the request the client has made of the servlet
      res - an HttpServletResponse object that contains the response the servlet sends to the client
      Throws:
      jakarta.servlet.ServletException
      IOException - - thrown on failure to deserialize the request body
      See Also:
      • ServletDispatcher.sendPost(String, Object[])
    • setup

      protected RemoteStatus setup(String[] args)
      Default setup does nothing for those existing tests that do not require setup.
      Parameters:
      args - - the arguments to pass to the setup method
      Returns:
      the status of the setup method
    • setup

      protected RemoteStatus setup(String[] args, Properties props)
    • runTest

      protected abstract RemoteStatus runTest()
      Override this method to implement the test method invocation. The name of the test to run is stored in the testName variable.
      Returns:
      the status of the test method