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 -
Method Summary
Modifier and TypeMethodDescriptionvoiddoGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) A basic implementation of thedoGetmethod which will call invokeTest.voiddoPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) A basic implementation of thedoPostmethod which will call invokeTest.voidinit(jakarta.servlet.ServletConfig config) initinitializes the servlet.protected voidinvokeTest(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) invokeTestuses 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, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
HttpTCKServlet
public HttpTCKServlet()
-
-
Method Details
-
init
public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException initinitializes the servlet.- Specified by:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classjakarta.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 invokeTestuses reflection to invoke test methods in child classes of this particular class.- Parameters:
req- -HttpServletRequestres- -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 thedoGetmethod which will call invokeTest.- Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Parameters:
req- -HttpServletRequestres- -HttpServletResponse- Throws:
jakarta.servlet.ServletException- if an error occursIOException- 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 thedoPostmethod which will call invokeTest.- Overrides:
doPostin classjakarta.servlet.http.HttpServlet- Parameters:
req- -HttpServletRequestres- -HttpServletResponse- Throws:
jakarta.servlet.ServletException- if an error occursIOException- if an IO error occurs
-