public class WebResourceHandler extends AbstractModulesHandler
TODO: IMPORTANT: Don't use logging anywhere inside this class. When used in a web client, this runs in conjunction with an authentication plugin during session establishment with the P2J server and using logging the application will deadlock.
org.eclipse.jetty.server.handler.AbstractHandler.ErrorDispatchHandlerorg.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListenerorg.eclipse.jetty.util.component.LifeCycle.Listener| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
basePath
The parent context path.
|
private java.lang.String |
resPath
The root folder (as is found in the class path jar's) for where to serve the resources.
|
private java.lang.String |
webRoot
The context path for this resource.
|
| Constructor and Description |
|---|
WebResourceHandler(java.lang.String basePath,
java.lang.String webRoot,
java.lang.String resPath)
Create a new resource handler with an empty parent context path.
|
| Modifier and Type | Method and Description |
|---|---|
static org.eclipse.jetty.server.Handler |
getGetTextJS(java.lang.String basePath)
Gets gettext.js JavaScript module handler.
|
boolean |
isModuleRequest(java.lang.String target,
org.eclipse.jetty.server.Request base,
javax.servlet.http.HttpServletRequest request)
Returns true if it is a request for this module, otherwise false.
|
java.lang.String |
mapToResource(java.lang.String target)
Maps the target of the request to its resource name.
|
handledetectContentType, sendResponsedestroy, doError, doStart, doStop, getServer, setServeraddBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stopprivate final java.lang.String basePath
private final java.lang.String webRoot
private final java.lang.String resPath
public WebResourceHandler(java.lang.String basePath,
java.lang.String webRoot,
java.lang.String resPath)
basePath - The parent context path.webRoot - The context path for this resource.resPath - The root folder (as is found in the class path jar's) for where to serve the
resources.public static org.eclipse.jetty.server.Handler getGetTextJS(java.lang.String basePath)
basePath - The parent context path. May be empty.public boolean isModuleRequest(java.lang.String target,
org.eclipse.jetty.server.Request base,
javax.servlet.http.HttpServletRequest request)
isModuleRequest in class AbstractModulesHandlertarget - The target of the request - either a URI or a name.base - The base request.request - The object or a wrapper of the request.public java.lang.String mapToResource(java.lang.String target)
mapToResource in class AbstractModulesHandlertarget - The target of the request - either a URI or a name.