Class LocaleWebAppHandler

All Implemented Interfaces:
Handler, Handler.Container, Handler.Singleton, Request.Handler, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle, Invocable

public class LocaleWebAppHandler extends Handler.Wrapper
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
  • Constructor Details

    • LocaleWebAppHandler

      public LocaleWebAppHandler(I2PAppContext ctx, String path, String warPath, File tmpdir, org.eclipse.jetty.ee8.servlet.ServletHandler servletHandler)
  • Method Details

    • handle

      public boolean handle(Request request, Response response, Callback callback) throws Exception
      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 Request.Handler
      Overrides:
      handle in class Handler.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