Class JspServlet
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
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:
- declarations found in /WEB-INF/web.xml (found either on the bundleResourcePath in the bundle or in the ServletContext)
- tld files found under /WEB-INF (found either on the bundleResourcePath in the bundle or in the ServletContext)
- tld files found in jars on the Bundle-Classpath (see org.eclipse.equinox.internal.jsp.jasper.JSPClassLoader)
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.
- See Also:
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
ConstructorDescriptionJspServlet
(Bundle bundle, String bundleResourcePath) JspServlet
(Bundle bundle, String bundleResourcePath, String alias) -
Method Summary
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletContext, getServletName, init, log, log
-
Constructor Details
-
JspServlet
-
JspServlet
-
-
Method Details
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException - Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroy
in interfacejavax.servlet.Servlet
- Overrides:
destroy
in classjavax.servlet.GenericServlet
-
service
public void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
service
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
getServletConfig
public javax.servlet.ServletConfig getServletConfig()- Specified by:
getServletConfig
in interfacejavax.servlet.Servlet
- Overrides:
getServletConfig
in classjavax.servlet.GenericServlet
-
getServletInfo
- Specified by:
getServletInfo
in interfacejavax.servlet.Servlet
- Overrides:
getServletInfo
in classjavax.servlet.GenericServlet
-