public class SparkServlet
extends javax.servlet.http.HttpServlet
SparkApplications. Needs to be
initialized with the applicationName init parameter (or through a direct call to setSparkApplications(List)) to the list of application classes defining routes. An optional
wrapperSupplierName parameter can be provided (or directly set through the setRequestSupplier(BiFunction) method) to provide added path flexibility.| Constructor and Description |
|---|
SparkServlet() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
init(javax.servlet.ServletConfig config) |
protected void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
void |
setFilterMappingPattern(String filterMappingPattern) |
void |
setRequestSupplier(BiFunction<javax.servlet.http.HttpServletRequest,String,javax.servlet.http.HttpServletRequestWrapper> requestSupplier) |
void |
setSparkApplications(List<spark.servlet.SparkApplication> sparkApplications) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic void setRequestSupplier(BiFunction<javax.servlet.http.HttpServletRequest,String,javax.servlet.http.HttpServletRequestWrapper> requestSupplier)
public void setSparkApplications(List<spark.servlet.SparkApplication> sparkApplications)
public void setFilterMappingPattern(String filterMappingPattern)
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletprotected void service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
service in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionThis work is licensed under a Creative Commons Attribution 4.0 International License.