public class JspServlet
extends javax.servlet.http.HttpServlet
JSPServlet wraps the Apache Jasper Servlet making it appropriate for running in an OSGi environment under the Http Service. The Jasper JSPServlet makes use of the Thread Context Classloader to support compile and runtime of JSPs and to accommodate running in an OSGi environment, a Bundle is used to provide the similar context normally provided by the webapp.
The Jasper Servlet will search the ServletContext to find JSPs, tag library descriptors, and additional information in the web.xml as per the JSP 2.0 specification. In addition to the ServletContext this implementation will search the bundle (but not attached fragments) for matching resources in a manner consistent with the Http Service's notion of a resource. By using alias and bundleResourcePath the JSP lookup should be in line with the resource mapping specified in {102.4} of the OSGi HttpService.
TLD discovery is slightly different, to clarify it occurs in one of three ways:
Other than the setting and resetting of the thread context classloader and additional resource lookups in the bundle the JSPServlet is behaviourally consistent with the JSP 2.0 specification and regular Jasper operation.
| Constructor and Description |
|---|
JspServlet(Bundle bundle,
String bundleResourcePath) |
JspServlet(Bundle bundle,
String bundleResourcePath,
String alias) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
javax.servlet.ServletConfig |
getServletConfig() |
String |
getServletInfo() |
void |
init(javax.servlet.ServletConfig config) |
void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic 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.GenericServletpublic void service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
service in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionpublic javax.servlet.ServletConfig getServletConfig()
getServletConfig in interface javax.servlet.ServletgetServletConfig in class javax.servlet.GenericServletpublic String getServletInfo()
getServletInfo in interface javax.servlet.ServletgetServletInfo in class javax.servlet.GenericServlet
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.