public class ApplicationServlet extends javax.servlet.http.HttpServlet implements ManagedServlet, Reloadable, ResourceLocator
Use it as the webengine servlet in web.xml if you want hot reload, otherwise directly use the Jersey servlet:
ServletContainer.
| Modifier and Type | Field and Description |
|---|---|
protected ApplicationHost |
app |
protected org.osgi.framework.Bundle |
bundle |
protected com.sun.jersey.spi.container.servlet.ServletContainer |
container |
protected boolean |
isDirty |
protected String |
resourcesPrefix |
| Constructor and Description |
|---|
ApplicationServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
containerService(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected com.sun.jersey.spi.container.servlet.ServletContainer |
createServletContainer(ApplicationHost app) |
void |
destroy() |
protected void |
destroyContainer() |
protected void |
destroyRendering() |
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
org.osgi.framework.Bundle |
getBundle() |
com.sun.jersey.spi.container.servlet.ServletContainer |
getContainer() |
RenderingEngine |
getRenderingEngine() |
File |
getResourceFile(String key)
Get a file resource given a key
|
URL |
getResourceURL(String key)
Gets an URL resource given a key
|
void |
init(javax.servlet.ServletConfig config) |
protected void |
initContainer(javax.servlet.ServletConfig config) |
protected RenderingEngine |
initRendering(javax.servlet.ServletConfig config) |
void |
reload() |
protected void |
reloadContainer() |
void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setDescriptor(ServletDescriptor sd) |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, serviceprotected volatile boolean isDirty
protected org.osgi.framework.Bundle bundle
protected ApplicationHost app
protected com.sun.jersey.spi.container.servlet.ServletContainer container
protected String resourcesPrefix
public ApplicationServlet()
public void setDescriptor(ServletDescriptor sd)
setDescriptor in interface ManagedServletpublic 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 reload()
reload in interface Reloadablepublic RenderingEngine getRenderingEngine()
public org.osgi.framework.Bundle getBundle()
public com.sun.jersey.spi.container.servlet.ServletContainer getContainer()
public 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.ServletExceptionIOExceptionprotected void containerService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionprotected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected RenderingEngine initRendering(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
javax.servlet.ServletExceptionprotected void destroyRendering()
protected void initContainer(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
javax.servlet.ServletExceptionprotected void destroyContainer()
protected void reloadContainer() throws javax.servlet.ServletException
javax.servlet.ServletExceptionprotected com.sun.jersey.spi.container.servlet.ServletContainer createServletContainer(ApplicationHost app)
public File getResourceFile(String key)
ResourceLocatorgetResourceFile in interface ResourceLocatorpublic URL getResourceURL(String key)
ResourceLocatorgetResourceURL in interface ResourceLocatorkey - the resource keyCopyright © 2017 Nuxeo. All rights reserved.