Package net.i2p.router.web
Class LocaleWebAppHandler
- All Implemented Interfaces:
Handler,Handler.Container,Handler.Singleton,Request.Handler,Container,Destroyable,Dumpable,Dumpable.DumpableContainer,LifeCycle,Invocable
Convert foo.jsp to foo_xx.jsp for language xx.
This is appropriate for jsps with large amounts of text.
Also, as of 0.8.2, rewrite "/" and "/index.html" to "/index.jsp",
and "/foo" to "/foo.jsp".
- Author:
- zzz
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.server.Handler.Abstract
Handler.Abstract.NonBlockingNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.server.Handler
Handler.Abstract, Handler.AbstractContainer, Handler.Collection, Handler.Container, Handler.Sequence, Handler.Singleton, Handler.WrapperNested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.TaskNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.server.Request.Handler
Request.Handler.AbortException -
Field Summary
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.eclipse.jetty.util.thread.Invocable
__nonBlocking, NOOP -
Constructor Summary
ConstructorsConstructorDescriptionLocaleWebAppHandler(I2PAppContext ctx, String path, String warPath, File tmpdir, org.eclipse.jetty.ee8.servlet.ServletHandler servletHandler) -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jetty.ee8.webapp.WebAppContextbooleanHandle foo.jsp by converting to foo_xx.jsp for language xx, where xx is the language for the default locale, or as specified in the routerconsole.lang property.static voidsetInitParams(org.eclipse.jetty.ee8.webapp.WebAppContext context, Map<?, ?> params) Methods inherited from class org.eclipse.jetty.server.Handler.Wrapper
getHandler, getInvocationType, setHandlerMethods inherited from class org.eclipse.jetty.server.Handler.AbstractContainer
findContainerOf, getDescendant, getDescendants, isDynamic, setDynamic, setServerMethods inherited from class org.eclipse.jetty.server.Handler.Abstract
destroy, doStart, doStop, getServerMethods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListenersMethods inherited from interface org.eclipse.jetty.util.component.Destroyable
destroyMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpableMethods inherited from interface org.eclipse.jetty.server.Handler.Container
getContainer, getDescendant, getDescendants, getDescendantsMethods inherited from interface org.eclipse.jetty.server.Handler.Singleton
getHandlers, getTail, insertHandler, setHandlerMethods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Constructor Details
-
LocaleWebAppHandler
public LocaleWebAppHandler(I2PAppContext ctx, String path, String warPath, File tmpdir, org.eclipse.jetty.ee8.servlet.ServletHandler servletHandler)
-
-
Method Details
-
handle
Handle foo.jsp by converting to foo_xx.jsp for language xx, where xx is the language for the default locale, or as specified in the routerconsole.lang property. Unless language == "en".- Specified by:
handlein interfaceRequest.Handler- Overrides:
handlein classHandler.Wrapper- Throws:
Exception
-
setInitParams
public static void setInitParams(org.eclipse.jetty.ee8.webapp.WebAppContext context, Map<?, ?> params) - Since:
- Jetty 7
-
getWebAppContext
public org.eclipse.jetty.ee8.webapp.WebAppContext getWebAppContext()- Since:
- Jetty 12
-