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
FieldsFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
runTest()
Override this method to implement the test method invocation.protected RemoteStatus
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
-
Field Details
-
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 interfacejakarta.servlet.Servlet
- Overrides:
init
in classjakarta.servlet.http.HttpServlet
- Parameters:
config
- theServletConfig
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 classjakarta.servlet.http.HttpServlet
- Parameters:
req
- anHttpServletRequest
object that contains the request the client has made of the servletres
- anHttpServletResponse
object that contains the response the servlet sends to the client- Throws:
jakarta.servlet.ServletException
- on test invocation failureIOException
- 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 classjakarta.servlet.http.HttpServlet
- Parameters:
req
- anHttpServletRequest
object that contains the request the client has made of the servletres
- anHttpServletResponse
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
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
-
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
-