From 71a5df65f0fd1bdd18373277d64e6927e15e00c2 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Sat, 22 May 2010 08:01:18 +0000 Subject: [PATCH] improved README.txt git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1839 7e9141cc-0065-0410-87d8-b60c137991c4 --- README.txt | 21 ++++++++++--------- .../eclipse/jetty/embedded/LikeJettyXml.java | 1 - .../jetty/servlets/MultiPartFilter.java | 3 +++ .../java/org/eclipse/jetty/start/Main.java | 2 +- .../src/main/java/com/acme/Dump.java | 15 ++++++++++--- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/README.txt b/README.txt index 640c7e9b43d..ae8caffa96b 100644 --- a/README.txt +++ b/README.txt @@ -43,20 +43,21 @@ To run with the default options: java -jar start.jar -To run with specific configuration file(s) - - java -jar start.jar etc/jetty.xml - -To see the available options +To see the available options and the default arguments +provided by the start.ini file: java -jar start.jar --help -To run with JSP support +To run with add configuration file(s), eg SSL + + java -jar start.jar etc/jetty-ssl.xml + +To run without the args from start.ini + + java -jar start.jar --ini OPTIONS=Server,websocket etc/jetty.xml etc/jetty-deploy.xml etc/jetty-ssl.xml + +To run with JNDI support java -jar start.jar OPTIONS=Server,jsp -To run with JMX support - - java -jar start.jar OPTIONS=Server,jmx etc/jetty-jmx.xml etc/jetty.xml - diff --git a/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/LikeJettyXml.java b/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/LikeJettyXml.java index 55a6c369ec5..27f9d30bac5 100644 --- a/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/LikeJettyXml.java +++ b/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/LikeJettyXml.java @@ -31,7 +31,6 @@ import org.eclipse.jetty.server.handler.RequestLogHandler; import org.eclipse.jetty.server.handler.StatisticsHandler; import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.server.ssl.SslSelectChannelConnector; -import org.eclipse.jetty.server.ssl.SslSocketConnector; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.thread.QueuedThreadPool; diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java index a29315d1c13..3cb26145f4c 100644 --- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java @@ -95,6 +95,9 @@ public class MultiPartFilter implements Filter return; } + System.err.println("Content-Length:"+((HttpServletRequest)request).getHeader("Content-Length")); + System.err.println("getContentLength:"+((HttpServletRequest)request).getContentLength()); + BufferedInputStream in = new BufferedInputStream(request.getInputStream()); String content_type=srequest.getContentType(); diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java index e81ee2556af..5ad5eae9995 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java @@ -92,7 +92,7 @@ public class Main boolean ini=false; for (String arg : args) { - if (arg.startsWith("--ini=")) + if (arg.startsWith("--ini=")||arg.equals("--ini")) { ini=true; if (arg.length()>6) diff --git a/test-jetty-webapp/src/main/java/com/acme/Dump.java b/test-jetty-webapp/src/main/java/com/acme/Dump.java index 2a37c3f66e3..86a04ffbd0f 100644 --- a/test-jetty-webapp/src/main/java/com/acme/Dump.java +++ b/test-jetty-webapp/src/main/java/com/acme/Dump.java @@ -13,6 +13,7 @@ package com.acme; import java.io.BufferedWriter; +import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; @@ -20,6 +21,7 @@ import java.io.PrintWriter; import java.io.Reader; import java.lang.reflect.Array; import java.lang.reflect.Field; +import java.util.Date; import java.util.Enumeration; import java.util.Locale; @@ -552,7 +554,6 @@ public class Dump extends HttpServlet pout.write(""); } - pout.write("\n"); pout.write("
Request Attributes:
"); Enumeration a= request.getAttributeNames(); @@ -561,8 +562,16 @@ public class Dump extends HttpServlet name= (String)a.nextElement(); pout.write("\n"); pout.write(""+name.replace("."," .")+": "); - pout.write(""+"
" + toString(request.getAttribute(name)) + "
"+""); - } + Object value=request.getAttribute(name); + if (value instanceof File) + { + File file = (File)value; + pout.write(""+"
" + file.getName()+" ("+file.length()+" "+new Date(file.lastModified())+ ")
"+""); + } + else + pout.write(""+"
" + toString(request.getAttribute(name)) + "
"+""); + } + request.setAttribute("org.eclipse.jetty.servlet.MultiPartFilter.files",null); pout.write("\n");