public class ServletWrapper extends Object
Servlet
.
ServletWrapper
are used to handle servlets from inside the application, instead of inside the servlet engine.Modifier and Type | Field and Description |
---|---|
private javax.servlet.Servlet |
_servlet |
Constructor and Description |
---|
ServletWrapper(javax.servlet.Servlet servlet)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
init(String servletName,
javax.servlet.ServletContext servletContext,
Map<String,String> parameters)
Initialize the servlet in the wrapper
|
void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Map objectModel,
Redirector redirect)
Calls service in the servlet
|
void |
service(Map objectModel,
Redirector redirect)
Calls service in the servlet, wrapping the request and the response
|
private javax.servlet.Servlet _servlet
public ServletWrapper(javax.servlet.Servlet servlet)
servlet
- A servlet to applypublic void init(String servletName, javax.servlet.ServletContext servletContext, Map<String,String> parameters) throws javax.servlet.ServletException
servletName
- NameservletContext
- Contextparameters
- Parametersjavax.servlet.ServletException
- Exception if servlet init failspublic void service(Map objectModel, Redirector redirect) throws javax.servlet.ServletException, IOException
objectModel
- object modelredirect
- redirectorjavax.servlet.ServletException
- exception thrown by the servletIOException
- exception thrown by the servletpublic void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map objectModel, Redirector redirect) throws javax.servlet.ServletException, IOException
request
- requestresponse
- responseobjectModel
- object modelredirect
- redirectorjavax.servlet.ServletException
- exception thrown by the servletIOException
- exception thrown by the servlet