net.i2p.router.web
Class LocaleWebAppHandler
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AggregateLifeCycle
org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.AbstractHandlerContainer
org.eclipse.jetty.server.handler.HandlerWrapper
net.i2p.router.web.LocaleWebAppHandler
- All Implemented Interfaces:
- Handler, HandlerContainer, Destroyable, Dumpable, LifeCycle
public class LocaleWebAppHandler
- extends HandlerWrapper
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
Methods inherited from class org.eclipse.jetty.util.component.AggregateLifeCycle |
addBean, addBean, contains, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage |
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocaleWebAppHandler
public LocaleWebAppHandler(I2PAppContext ctx,
String path,
String warPath,
File tmpdir,
ServletHandler servletHandler)
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:
handle
in interface Handler
- Overrides:
handle
in class HandlerWrapper
- Throws:
IOException
ServletException
setInitParams
public static void setInitParams(WebAppContext context,
Map<?,?> params)
- Since:
- Jetty 7