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 TypeMethodDescriptionvoiddoGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) GET methods are test method invocations.voiddoPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) POST methods are test method setup invocations.voidinit(jakarta.servlet.ServletConfig config) No usage of this setup method currently.protected abstract RemoteStatusrunTest()Override this method to implement the test method invocation.protected RemoteStatusDefault setup does nothing for those existing tests that do not require setup.protected RemoteStatussetup(String[] args, Properties props) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, isSensitiveHeader, service, serviceMethods 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:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classjakarta.servlet.http.HttpServlet- Parameters:
config- theServletConfigobject 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:
doGetin classjakarta.servlet.http.HttpServlet- Parameters:
req- anHttpServletRequestobject that contains the request the client has made of the servletres- anHttpServletResponseobject 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:
doPostin classjakarta.servlet.http.HttpServlet- Parameters:
req- anHttpServletRequestobject that contains the request the client has made of the servletres- anHttpServletResponseobject that contains the response the servlet sends to the client- Throws:
jakarta.servlet.ServletExceptionIOException- - 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
-