Package com.sun.ts.tests.common.web
Class ServletWrapper
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.sun.ts.tests.common.web.ServletWrapper
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
public abstract class ServletWrapper
extends jakarta.servlet.http.HttpServlet
Provide a testing framework for a Servlet test.
This class is intended to be extended by the actual Servlet test class that will define one or more test methods.
This is why this class is tagged "abstract".
This class shield the final Servlet class from Servlet life cycle and specific testing framework.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static TSNamingContext
static final String
Name of property used to send back test result to clientstatic final String
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
Constructors -
Method Summary
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
-
RESULT_PROP
Name of property used to send back test result to client- See Also:
-
TEST_NAME_PROP
- See Also:
-
nctx
-
-
Constructor Details
-
ServletWrapper
public ServletWrapper()
-
-
Method Details
-
init
public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException - Specified by:
init
in interfacejakarta.servlet.Servlet
- Overrides:
init
in classjakarta.servlet.http.HttpServlet
- Throws:
jakarta.servlet.ServletException
-
doGet
public void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws jakarta.servlet.ServletException, IOException - Overrides:
doGet
in classjakarta.servlet.http.HttpServlet
- Throws:
jakarta.servlet.ServletException
IOException
-
doPost
public void doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws jakarta.servlet.ServletException, IOException - Overrides:
doPost
in classjakarta.servlet.http.HttpServlet
- Throws:
jakarta.servlet.ServletException
IOException
-