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, service
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
public void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
public javax.servlet.ServletConfig getServletConfig()
getServletConfig
in interface javax.servlet.Servlet
getServletConfig
in class javax.servlet.GenericServlet
public String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
getServletInfo
in class javax.servlet.GenericServlet
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.