Package net.i2p.servlet
Class I2PDefaultServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.eclipse.jetty.servlet.DefaultServlet
-
- net.i2p.servlet.I2PDefaultServlet
-
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
,ResourceFactory
public class I2PDefaultServlet extends DefaultServlet
Extends DefaultServlet to set locale for the displayed time of directory listings, to prevent leaking of the locale.- Since:
- 0.9.31
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description I2PDefaultServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init()
Overridden to save local copies of dirAllowed, locale, resourceBase, and stylesheet.protected ContextHandler
initContextHandler(ServletContext servletContext)
Overridden to save the result Calls super.protected void
sendDirectory(HttpServletRequest request, HttpServletResponse response, Resource resource, String pathInContext)
Copied and modified from DefaultServlet.java.-
Methods inherited from class org.eclipse.jetty.servlet.DefaultServlet
destroy, doGet, doOptions, doPost, doTrace, getInitParameter, getResource, isGzippedContent, passConditionalHeaders, putHeaders, sendData, sendWelcome
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doPut, getLastModified, service, service
-
Methods inherited from class javax.servlet.GenericServlet
getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
-
-
-
Method Detail
-
init
public void init() throws UnavailableException
Overridden to save local copies of dirAllowed, locale, resourceBase, and stylesheet. Calls super.- Overrides:
init
in classDefaultServlet
- Throws:
UnavailableException
-
initContextHandler
protected ContextHandler initContextHandler(ServletContext servletContext)
Overridden to save the result Calls super.- Overrides:
initContextHandler
in classDefaultServlet
-
sendDirectory
protected void sendDirectory(HttpServletRequest request, HttpServletResponse response, Resource resource, String pathInContext) throws IOException
Copied and modified from DefaultServlet.java. Overridden to set the Locale for the dates. Get the resource list as a HTML directory listing.- Overrides:
sendDirectory
in classDefaultServlet
- Throws:
IOException
-
-