Package net.i2p.router.web
Class LocaleWebAppHandler
- All Implemented Interfaces:
Handler,HandlerContainer,Container,Destroyable,Dumpable,Dumpable.DumpableContainer,LifeCycle
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.AbstractHandler
AbstractHandler.ErrorDispatchHandlerNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListenerNested 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.util.component.LifeCycle
LifeCycle.Listener -
Field Summary
Fields inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
_handler -
Constructor Summary
ConstructorsConstructorDescriptionLocaleWebAppHandler(I2PAppContext ctx, String path, String warPath, File tmpdir, ServletHandler servletHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(String pathInContext, Request baseRequest, HttpServletRequest httpRequest, HttpServletResponse httpResponse) 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.static voidsetInitParams(WebAppContext context, Map<?, ?> params) Methods inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
destroy, expandChildren, getHandler, getHandlers, insertHandler, setHandlerMethods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerContainer
doShutdown, expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass, setServerMethods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
doError, doStart, doStop, getServerMethods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, 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, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, 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.Dumpable.DumpableContainer
isDumpableMethods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Constructor Details
-
LocaleWebAppHandler
public LocaleWebAppHandler(I2PAppContext ctx, String path, String warPath, File tmpdir, ServletHandler servletHandler)
-
-
Method Details
-
handle
public void handle(String pathInContext, Request baseRequest, HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException 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 interfaceHandler- Overrides:
handlein classHandlerWrapper- Throws:
IOExceptionServletException
-
setInitParams
- Since:
- Jetty 7
-