Class SSIServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.catalina.ssi.SSIServlet
- All Implemented Interfaces:
Servlet
,ServletConfig
,Serializable
Servlet to process SSI requests within a webpage. Mapped to a path from within web.xml.
- Author:
- Bip Thelin, Amy Roh, Dan Sandberg, David Becker
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Allow exec (normally blocked for security)protected boolean
Should the output be buffered.protected int
Debug level for this servlet.protected Long
Expiration time in seconds for the doc.protected String
Input encoding.protected boolean
virtual path can be webapp-relativeprotected String
Output encoding.Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doGet
(HttpServletRequest req, HttpServletResponse res) Process and forward the GET request to ourrequestHandler()
.void
doPost
(HttpServletRequest req, HttpServletResponse res) Process and forward the POST request to ourrequestHandler()
.void
init()
A convenience method which can be overridden so that there's no need to callsuper.init(config)
.protected void
processSSI
(HttpServletRequest req, HttpServletResponse res, URL resource) protected void
Process our request and locate right SSI command.Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, service
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Field Details
-
debug
protected int debugDebug level for this servlet. -
buffered
protected boolean bufferedShould the output be buffered. -
expires
Expiration time in seconds for the doc. -
isVirtualWebappRelative
protected boolean isVirtualWebappRelativevirtual path can be webapp-relative -
inputEncoding
Input encoding. If not specified, uses platform default -
outputEncoding
Output encoding. If not specified, uses platform default -
allowExec
protected boolean allowExecAllow exec (normally blocked for security)
-
-
Constructor Details
-
SSIServlet
public SSIServlet()
-
-
Method Details
-
init
Description copied from class:jakarta.servlet.GenericServlet
A convenience method which can be overridden so that there's no need to callsuper.init(config)
.Instead of overriding
GenericServlet.init(ServletConfig)
, simply override this method and it will be called byGenericServlet.init(ServletConfig config)
. TheServletConfig
object can still be retrieved viaGenericServlet.getServletConfig()
.- Overrides:
init
in classGenericServlet
- Throws:
ServletException
- if an exception occurs that interrupts the servlet's normal operation
-
doGet
public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException Process and forward the GET request to ourrequestHandler()
.- Overrides:
doGet
in classHttpServlet
- Parameters:
req
- a value of type 'HttpServletRequest'res
- a value of type 'HttpServletResponse'- Throws:
IOException
- if an error occursServletException
- if an error occurs- See Also:
-
doPost
public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException Process and forward the POST request to ourrequestHandler()
.- Overrides:
doPost
in classHttpServlet
- Parameters:
req
- a value of type 'HttpServletRequest'res
- a value of type 'HttpServletResponse'- Throws:
IOException
- if an error occursServletException
- if an error occurs- See Also:
-
requestHandler
Process our request and locate right SSI command.- Parameters:
req
- a value of type 'HttpServletRequest'res
- a value of type 'HttpServletResponse'- Throws:
IOException
- an IO error occurred
-
processSSI
protected void processSSI(HttpServletRequest req, HttpServletResponse res, URL resource) throws IOException - Throws:
IOException
-