Package org.apache.catalina.ssi
Class SSIServlet
- java.lang.Object
-
- jakarta.servlet.GenericServlet
-
- jakarta.servlet.http.HttpServlet
-
- org.apache.catalina.ssi.SSIServlet
-
- All Implemented Interfaces:
Servlet
,ServletConfig
,java.io.Serializable
public class SSIServlet extends HttpServlet
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
allowExec
Allow exec (normally blocked for security)protected boolean
buffered
Should the output be buffered.protected int
debug
Debug level for this servlet.protected java.lang.Long
expires
Expiration time in seconds for the doc.protected java.lang.String
inputEncoding
Input encoding.protected boolean
isVirtualWebappRelative
virtual path can be webapp-relativeprotected java.lang.String
outputEncoding
Output encoding.
-
Constructor Summary
Constructors Constructor Description SSIServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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()
Initialize this servlet.protected void
processSSI(HttpServletRequest req, HttpServletResponse res, java.net.URL resource)
protected void
requestHandler(HttpServletRequest req, HttpServletResponse res)
Process our request and locate right SSI command.-
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
-
-
-
Field Detail
-
debug
protected int debug
Debug level for this servlet.
-
buffered
protected boolean buffered
Should the output be buffered.
-
expires
protected java.lang.Long expires
Expiration time in seconds for the doc.
-
isVirtualWebappRelative
protected boolean isVirtualWebappRelative
virtual path can be webapp-relative
-
inputEncoding
protected java.lang.String inputEncoding
Input encoding. If not specified, uses platform default
-
outputEncoding
protected java.lang.String outputEncoding
Output encoding. If not specified, uses platform default
-
allowExec
protected boolean allowExec
Allow exec (normally blocked for security)
-
-
Method Detail
-
init
public void init() throws ServletException
Initialize this servlet.- Overrides:
init
in classGenericServlet
- Throws:
ServletException
- if an error occurs
-
doGet
public void doGet(HttpServletRequest req, HttpServletResponse res) throws java.io.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:
java.io.IOException
- if an error occursServletException
- if an error occurs- See Also:
ServletResponse.setContentType(java.lang.String)
-
doPost
public void doPost(HttpServletRequest req, HttpServletResponse res) throws java.io.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:
java.io.IOException
- if an error occursServletException
- if an error occurs- See Also:
ServletOutputStream
,ServletResponse.setContentType(java.lang.String)
-
requestHandler
protected void requestHandler(HttpServletRequest req, HttpServletResponse res) throws java.io.IOException
Process our request and locate right SSI command.- Parameters:
req
- a value of type 'HttpServletRequest'res
- a value of type 'HttpServletResponse'- Throws:
java.io.IOException
- an IO error occurred
-
processSSI
protected void processSSI(HttpServletRequest req, HttpServletResponse res, java.net.URL resource) throws java.io.IOException
- Throws:
java.io.IOException
-
-