diff --git a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java index 1c89db03e..534e26bd5 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java @@ -23,6 +23,10 @@ public class RouterConsoleRunner { private String _listenHost = "127.0.0.1"; private String _webAppsDir = "./webapps/"; + static { + System.setProperty("org.mortbay.http.Version.paranoid", "true"); + } + public RouterConsoleRunner(String args[]) { if (args.length == 3) { _listenPort = args[0].trim(); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java index 5d920fa07..7967ee72e 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java @@ -335,7 +335,9 @@ public class SummaryHelper { public String getDestinations() { ByteArrayOutputStream baos = new ByteArrayOutputStream(1024); try { - _context.clientManager().renderStatusHTML(new OutputStreamWriter(baos)); + OutputStreamWriter osw = new OutputStreamWriter(baos); + _context.clientManager().renderStatusHTML(osw); + osw.flush(); return new String(baos.toByteArray()); } catch (IOException ioe) { _context.logManager().getLog(SummaryHelper.class).error("Error rendering client info", ioe); diff --git a/build.xml b/build.xml index 1de72f42b..b196c8d7d 100644 --- a/build.xml +++ b/build.xml @@ -6,7 +6,7 @@ - + @@ -143,7 +143,7 @@ - + @@ -207,8 +207,12 @@ - - + + + + + + @@ -226,6 +230,12 @@ + + + + + + diff --git a/core/java/src/net/i2p/util/LogManager.java b/core/java/src/net/i2p/util/LogManager.java index de3c7a2b1..f51b21662 100644 --- a/core/java/src/net/i2p/util/LogManager.java +++ b/core/java/src/net/i2p/util/LogManager.java @@ -246,8 +246,8 @@ public class LogManager { File cfgFile = new File(_location); if (!cfgFile.exists()) { if (!_alreadyNoticedMissingConfig) { - if (_log.shouldLog(Log.ERROR)) - _log.error("Log file " + _location + " does not exist"); + if (_log.shouldLog(Log.WARN)) + _log.warn("Log file " + _location + " does not exist"); System.err.println("Log file " + _location + " does not exist"); _alreadyNoticedMissingConfig = true; } diff --git a/history.txt b/history.txt index 57a1cca70..4a2fba9ee 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,9 @@ -$Id: history.txt,v 1.21 2004/09/27 02:57:43 jrandom Exp $ +$Id: history.txt,v 1.22 2004/09/29 14:34:02 jrandom Exp $ + +2004-09-30 jrandom + * Bundle the configuration necessary to run an eepsite out of the box + with Jetty - simply edit ./eepsite/docroot/index.html and give people + the key listed on the I2PTunnel configuration page, and its up. 2004-09-29 jrandom * Always wipe the Jetty work directory on startup, so that web updates diff --git a/installer/resources/clients.config b/installer/resources/clients.config index 80fa91e92..90c38548c 100644 --- a/installer/resources/clients.config +++ b/installer/resources/clients.config @@ -13,3 +13,8 @@ clientApp.1.args=sam.keys 127.0.0.1 7656 i2cp.tcp.host=localhost i2cp.tcp.port=7 clientApp.2.main=net.i2p.i2ptunnel.TunnelControllerGroup clientApp.2.name=Tunnels clientApp.2.args=i2ptunnel.config + +# run our own eepsite with a seperate jetty instance +clientApp.3.main=org.mortbay.jetty.Server +clientApp.3.name=eepsite +clientApp.3.args=eepsite/jetty.xml \ No newline at end of file diff --git a/installer/resources/eepsite_index.html b/installer/resources/eepsite_index.html new file mode 100644 index 000000000..7e2b203a1 --- /dev/null +++ b/installer/resources/eepsite_index.html @@ -0,0 +1,24 @@ + + + Welcome to your eepsite + + +

Welcome to your eepsite

+ +

This is your eepsite - simply edit the files under ./eepsite/docroot/ + and they'll be reachable. The 'key' to your eepsite that you need to + give to other people is shown on the I2PTunnel configuration + configuration page).

+

+ If you have any standard java web applications (.war files) such as + blojsom + or SnipSnap, simply drop their .war + file into ./eepsite/webapps/ and they'll be reachable at + http://$yourEeepsite/warFileName/

+ +

You can also reach your eepsite locally through + http://localhost:7658/. If you + want to change the port number, edit the file ./eepsite/jetty.xml and + update the I2PTunnel configuration accordingly.

+ + diff --git a/installer/resources/i2ptunnel.config b/installer/resources/i2ptunnel.config index 174ae0550..86d624e91 100644 --- a/installer/resources/i2ptunnel.config +++ b/installer/resources/i2ptunnel.config @@ -38,14 +38,14 @@ tunnel.2.option.tunnels.numInbound=2 tunnel.2.startOnLoad=false # local eepserver -#tunnel.3.name=eepsite -#tunnel.3.description=My eepsite -#tunnel.3.type=server -#tunnel.3.targetHost=localhost -#tunnel.3.targetPort=8000 -#tunnel.3.privKeyFile=eepPriv.dat -#tunnel.3.i2cpHost=localhost -#tunnel.3.i2cpPort=7654 -#tunnel.3.option.tunnels.depthInbound=2 -#tunnel.3.option.tunnels.numInbound=2 -#tunnel.3.startOnLoad=true \ No newline at end of file +tunnel.3.name=eepsite +tunnel.3.description=My eepsite +tunnel.3.type=server +tunnel.3.targetHost=localhost +tunnel.3.targetPort=7658 +tunnel.3.privKeyFile=eepsite/eepPriv.dat +tunnel.3.i2cpHost=localhost +tunnel.3.i2cpPort=7654 +tunnel.3.option.tunnels.depthInbound=2 +tunnel.3.option.tunnels.numInbound=2 +tunnel.3.startOnLoad=true \ No newline at end of file diff --git a/installer/resources/jetty.xml b/installer/resources/jetty.xml new file mode 100644 index 000000000..fc625055d --- /dev/null +++ b/installer/resources/jetty.xml @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + 127.0.0.1 + 7658 + + + 3 + 10 + 30000 + 1000 + 8443 + 8443 + main + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + root + + + ./eepsite/webapps/ + ./eepsite/webdefault.xml + true + + + + + + + + + + + + + + + / + ./eepsite/docroot + + + + FALSE + + + + + + + + + + + + + ./eepsite/logs/yyyy_mm_dd.request.log + 90 + true + false + false + GMT + + + + + + + 2000 + false + + diff --git a/installer/resources/wrapper.config b/installer/resources/wrapper.config index 018bd85af..6147ead95 100644 --- a/installer/resources/wrapper.config +++ b/installer/resources/wrapper.config @@ -39,6 +39,7 @@ wrapper.java.library.path.2=lib # Java Additional Parameters wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt +wrapper.java.additional.2=-Dorg.mortbay.http.Version.paranoid=true # Initial Java Heap Size (in MB) #wrapper.java.initmemory=4