mindless history.txt servlet

This commit is contained in:
zzz
2010-12-03 20:40:34 +00:00
parent fabbda659b
commit 8976746867
3 changed files with 19 additions and 1 deletions

View File

@@ -53,7 +53,8 @@ public class LocaleWebAppHandler extends WebApplicationHandler
// home page
pathInContext = "/index.jsp";
} else if (pathInContext.indexOf("/", 1) < 0 &&
!pathInContext.endsWith(".jsp")) {
(!pathInContext.endsWith(".jsp")) &&
(!pathInContext.endsWith(".txt"))) {
// add .jsp to pages at top level
pathInContext += ".jsp";
}

View File

@@ -0,0 +1,12 @@
<%
/*
* USE CAUTION WHEN EDITING
* Trailing whitespace OR NEWLINE on the last line will cause
* IllegalStateExceptions !!!
*
* Do not tag this file for translation.
*/
response.setContentType("text/plain");
String base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath();
net.i2p.util.FileUtil.readFile("history.txt", base, response.getOutputStream());
%>

View File

@@ -17,6 +17,11 @@
<url-pattern>/javadoc/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>net.i2p.router.web.jsp.viewhistory_jsp</servlet-name>
<url-pattern>/history.txt</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30