net.i2p.router.web
Class LocaleWebAppHandler
java.lang.Object
org.mortbay.util.Container
org.mortbay.jetty.servlet.ServletHandler
org.mortbay.jetty.servlet.WebApplicationHandler
net.i2p.router.web.LocaleWebAppHandler
- All Implemented Interfaces:
- Serializable, HttpHandler, EventProvider, LifeCycle
public class LocaleWebAppHandler
- extends WebApplicationHandler
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",x
and "/foo" to "/foo.jsp".
- Author:
- zzz
- See Also:
- Serialized Form
Fields inherited from class org.mortbay.jetty.servlet.ServletHandler |
__DEFAULT_SERVLET, __J_S_CONTEXT_TEMPDIR, __J_S_ERROR_EXCEPTION, __J_S_ERROR_EXCEPTION_TYPE, __J_S_ERROR_MESSAGE, __J_S_ERROR_REQUEST_URI, __J_S_ERROR_SERVLET_NAME, __J_S_ERROR_STATUS_CODE, _attributes, _contextLog, _formErrorPage, _formLoginPage, _httpContext, _loader, _nameMap, _servletMap, _sessionManager |
Methods inherited from class org.mortbay.jetty.servlet.WebApplicationHandler |
addComponent, addEventListener, addFilterHolder, addFilterPathMapping, addFilterServletMapping, defineFilter, destroy, dispatch, doStart, doStop, getErrorPage, getFilter, getFilters, getJsr154Filter, initializeServlets, isAcceptRanges, isFilterChainsCached, main, newFilterHolder, removeComponent, removeContextAttribute, removeEventListener, setAcceptRanges, setContextAttribute, setFilterChainsCached, setSessionManager |
Methods inherited from class org.mortbay.jetty.servlet.ServletHandler |
addServlet, addServlet, addServlet, addServletHolder, finalize, formAuthInit, getClassLoader, getContextAttribute, getContextAttributeNames, getHolderEntry, getHttpContext, getHttpSession, getName, getNamedDispatcher, getRealPath, getRequestDispatcher, getResource, getResourceAsStream, getResourcePaths, getServletContext, getServletHolder, getServletMap, getServlets, getSessionManager, handleOptions, handleTrace, initialize, isAutoInitializeServlets, isUsingCookies, mapPathToServlet, newHttpSession, newServletHolder, newServletHolder, notFound, setAutoInitializeServlets, setDynamicInitParams, setDynamicServletPathSpec, setName, setServeDynamicSystemServlets, setSessionInactiveInterval, setUsingCookies |
LocaleWebAppHandler
public LocaleWebAppHandler(I2PAppContext ctx)
handle
public void handle(String pathInContext,
String pathParams,
HttpRequest httpRequest,
HttpResponse httpResponse)
throws IOException
- 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 HttpHandler
- Overrides:
handle
in class ServletHandler
- Throws:
IOException
handleTrace
public void handleTrace(HttpRequest request,
HttpResponse response)
throws IOException
- Overrides method in ServletHandler
- Overrides:
handleTrace
in class ServletHandler
- Throws:
IOException
- Since:
- 0.8
handleOptions
public void handleOptions(HttpRequest request,
HttpResponse response)
throws IOException
- Not an override
- Throws:
IOException
- Since:
- 0.8