Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-04-26 03:53:28 +0000
committerGreg Wilkins2013-04-26 03:53:28 +0000
commit9558d7e815ac9815bdfbb8820177384a8d5e16eb (patch)
treef0c738f8f3c6097dee8beb6872e5f9c99f2e7260
parentdbedbfa67e2ccfb41cb41de6f6bb65961a5ea315 (diff)
downloadorg.eclipse.jetty.project-9558d7e815ac9815bdfbb8820177384a8d5e16eb.tar.gz
org.eclipse.jetty.project-9558d7e815ac9815bdfbb8820177384a8d5e16eb.tar.xz
org.eclipse.jetty.project-9558d7e815ac9815bdfbb8820177384a8d5e16eb.zip
modular start.ini files and --download start option
-rw-r--r--jetty-distribution/pom.xml6
-rw-r--r--jetty-distribution/src/main/resources/start.available/000-jvm.ini21
-rw-r--r--jetty-distribution/src/main/resources/start.available/110-logging.ini7
-rw-r--r--jetty-distribution/src/main/resources/start.available/110-setuid.ini13
-rw-r--r--jetty-distribution/src/main/resources/start.available/200-npn.ini12
-rw-r--r--jetty-distribution/src/main/resources/start.available/200-ssl.ini12
-rw-r--r--jetty-distribution/src/main/resources/start.available/210-https.ini6
-rw-r--r--jetty-distribution/src/main/resources/start.available/210-spdy.ini9
-rw-r--r--jetty-distribution/src/main/resources/start.available/300-plus.ini8
-rw-r--r--jetty-distribution/src/main/resources/start.available/300-requestlog.ini9
-rw-r--r--jetty-distribution/src/main/resources/start.available/400-debug.ini1
-rw-r--r--jetty-distribution/src/main/resources/start.available/400-ipaccess.ini1
-rw-r--r--jetty-distribution/src/main/resources/start.available/400-lowresources.ini11
-rw-r--r--jetty-distribution/src/main/resources/start.available/400-stats.ini4
-rw-r--r--jetty-distribution/src/main/resources/start.d/100-jetty.ini16
-rw-r--r--jetty-distribution/src/main/resources/start.d/110-jmx.ini10
-rw-r--r--jetty-distribution/src/main/resources/start.d/110-jsp.ini5
-rw-r--r--jetty-distribution/src/main/resources/start.d/210-http.ini6
-rw-r--r--jetty-distribution/src/main/resources/start.d/500-deploy.ini4
-rw-r--r--jetty-distribution/src/main/resources/start.ini200
-rw-r--r--jetty-distribution/src/main/resources/webapps.demo/README.TXT7
-rw-r--r--jetty-distribution/src/main/resources/webapps.demo/ROOT/images/jetty-header.jpg (renamed from jetty-distribution/src/main/resources/webapps/ROOT/images/jetty-header.jpg)bin103289 -> 103289 bytes
-rw-r--r--jetty-distribution/src/main/resources/webapps.demo/ROOT/images/webtide_logo.jpg (renamed from jetty-distribution/src/main/resources/webapps/ROOT/images/webtide_logo.jpg)bin17678 -> 17678 bytes
-rw-r--r--jetty-distribution/src/main/resources/webapps.demo/ROOT/index.html (renamed from jetty-distribution/src/main/resources/webapps/ROOT/index.html)0
-rw-r--r--jetty-distribution/src/main/resources/webapps.demo/ROOT/jetty.css (renamed from jetty-distribution/src/main/resources/webapps/ROOT/jetty.css)0
-rw-r--r--jetty-distribution/src/main/resources/webapps.demo/example-moved.xml (renamed from jetty-distribution/src/main/resources/webapps/example-moved.xml)0
-rw-r--r--jetty-distribution/src/main/resources/webapps.demo/javadoc.xml (renamed from jetty-distribution/src/main/resources/webapps/javadoc.xml)0
-rw-r--r--jetty-distribution/src/main/resources/webapps/.donotdelete0
-rw-r--r--jetty-server/src/main/config/etc/jetty-http.xml2
-rw-r--r--jetty-server/src/main/config/etc/jetty-lowresources.xml12
-rw-r--r--jetty-server/src/main/config/etc/jetty-requestlog.xml6
-rw-r--r--jetty-server/src/main/config/etc/jetty.xml6
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Main.java123
-rw-r--r--jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt4
-rw-r--r--tests/test-webapps/test-jaas-webapp/src/main/config/webapps.demo/test-jaas.xml (renamed from tests/test-webapps/test-jaas-webapp/src/main/config/webapps/test-jaas.xml)0
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/etc/jetty-demo.xml21
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/start.d/900-demo.ini (renamed from tests/test-webapps/test-jetty-webapp/src/main/config/start.d/test-webapp.ini)1
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/webapps.demo/test.d/override-web.xml (renamed from tests/test-webapps/test-jetty-webapp/src/main/config/webapps/test.d/override-web.xml)0
-rw-r--r--tests/test-webapps/test-jetty-webapp/src/main/config/webapps.demo/test.xml (renamed from tests/test-webapps/test-jetty-webapp/src/main/config/webapps/test.xml)6
39 files changed, 335 insertions, 214 deletions
diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml
index 2189d3bb75..2ed6b82ff9 100644
--- a/jetty-distribution/pom.xml
+++ b/jetty-distribution/pom.xml
@@ -100,7 +100,7 @@
<type>war</type>
<overWrite>true</overWrite>
<includes>**</includes>
- <outputDirectory>${assembly-directory}/webapps</outputDirectory>
+ <outputDirectory>${assembly-directory}/webapps.demo</outputDirectory>
<destFileName>test.war</destFileName>
</artifactItem>
<artifactItem>
@@ -110,7 +110,7 @@
<type>war</type>
<overWrite>true</overWrite>
<includes>**</includes>
- <outputDirectory>${assembly-directory}/webapps</outputDirectory>
+ <outputDirectory>${assembly-directory}/webapps.demo</outputDirectory>
<destFileName>xref-proxy.war</destFileName>
</artifactItem>
<artifactItem>
@@ -120,7 +120,7 @@
<type>war</type>
<overWrite>true</overWrite>
<includes>**</includes>
- <outputDirectory>${assembly-directory}/webapps</outputDirectory>
+ <outputDirectory>${assembly-directory}/webapps.demo</outputDirectory>
<destFileName>async-rest.war</destFileName>
</artifactItem>
<artifactItem>
diff --git a/jetty-distribution/src/main/resources/start.available/000-jvm.ini b/jetty-distribution/src/main/resources/start.available/000-jvm.ini
new file mode 100644
index 0000000000..1f5e32946c
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/000-jvm.ini
@@ -0,0 +1,21 @@
+#===========================================================
+# Configure JVM arguments.
+#-----------------------------------------------------------
+--exec
+
+-Xmx2000m
+-Xmn512m
+-XX:+UseConcMarkSweepGC
+-XX:ParallelCMSThreads=2
+-XX:+CMSClassUnloadingEnabled
+-XX:+UseCMSCompactAtFullCollection
+-XX:CMSInitiatingOccupancyFraction=80
+# -verbose:gc
+# -XX:+PrintGCDateStamps
+# -XX:+PrintGCTimeStamps
+# -XX:+PrintGCDetails
+# -XX:+PrintTenuringDistribution
+# -XX:+PrintCommandLineFlags
+# -XX:+DisableExplicitGC
+
+# -Dorg.apache.jasper.compiler.disablejsr199=true
diff --git a/jetty-distribution/src/main/resources/start.available/110-logging.ini b/jetty-distribution/src/main/resources/start.available/110-logging.ini
new file mode 100644
index 0000000000..c8dfa64da1
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/110-logging.ini
@@ -0,0 +1,7 @@
+#===========================================================
+# Server logging.
+# The following configuration will redirect stderr and stdout
+# to file which is rolled over daily.
+#-----------------------------------------------------------
+jetty.log.retain=90
+etc/jetty-logging.xml
diff --git a/jetty-distribution/src/main/resources/start.available/110-setuid.ini b/jetty-distribution/src/main/resources/start.available/110-setuid.ini
new file mode 100644
index 0000000000..97b1682ced
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/110-setuid.ini
@@ -0,0 +1,13 @@
+#===========================================================
+# Enable SetUID
+# The default user and group is 'jetty' and if you are
+# starting as root you must change the run privledged to true
+#-----------------------------------------------------------
+OPTIONS=setuid
+jetty.startServerAsPrivileged=false
+jetty.username=jetty
+jetty.groupname=jetty
+jetty.umask=002
+
+etc/jetty-setuid.xml
+
diff --git a/jetty-distribution/src/main/resources/start.available/200-npn.ini b/jetty-distribution/src/main/resources/start.available/200-npn.ini
new file mode 100644
index 0000000000..0ca98db0fd
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/200-npn.ini
@@ -0,0 +1,12 @@
+#===========================================================
+# NPN Next Protocol Negotiation
+#
+# The SPDY and HTTP/2.0 connectors require NPN. The jar for
+# NPN cannot be downloaded from eclipse. So the --download
+# option is used to install the NPN jar if it does not already
+# exist
+#
+#-----------------------------------------------------------
+--exec
+--download=http://repo1.maven.org/maven2/org/mortbay/jetty/npn/npn-boot/1.1.5.v20130313/npn-boot-1.1.5.v20130313.jar:lib/npn/npn-boot-1.1.5.v20130313.jar
+-Xbootclasspath/p:lib/npn/npn-boot-1.1.5.v20130313.jar
diff --git a/jetty-distribution/src/main/resources/start.available/200-ssl.ini b/jetty-distribution/src/main/resources/start.available/200-ssl.ini
new file mode 100644
index 0000000000..6a56dd54e6
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/200-ssl.ini
@@ -0,0 +1,12 @@
+#===========================================================
+# SSL Context
+# For use by HTTPS and SPDY
+#-----------------------------------------------------------
+jetty.keystore=etc/keystore
+jetty.keystore.password=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4
+jetty.keymanager.password=OBF:1u2u1wml1z7s1z7a1wnl1u2g
+jetty.truststore=etc/keystore
+jetty.truststore.password=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4
+jetty.secure.port=8443
+
+etc/jetty-ssl.xml
diff --git a/jetty-distribution/src/main/resources/start.available/210-https.ini b/jetty-distribution/src/main/resources/start.available/210-https.ini
new file mode 100644
index 0000000000..42897c42da
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/210-https.ini
@@ -0,0 +1,6 @@
+#===========================================================
+# HTTPS Connector
+# Must be used with 200-ssl.ini
+#-----------------------------------------------------------
+jetty.https.port=8443
+etc/jetty-https.xml
diff --git a/jetty-distribution/src/main/resources/start.available/210-spdy.ini b/jetty-distribution/src/main/resources/start.available/210-spdy.ini
new file mode 100644
index 0000000000..0d0eac4691
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/210-spdy.ini
@@ -0,0 +1,9 @@
+#===========================================================
+# SPDY Connector
+# Must be used with 200-ssl.ini and 200-npn.ini
+#-----------------------------------------------------------
+OPTIONS=spdy
+jetty.spdy.port=8443
+
+etc/jetty-spdy.xml
+
diff --git a/jetty-distribution/src/main/resources/start.available/300-plus.ini b/jetty-distribution/src/main/resources/start.available/300-plus.ini
new file mode 100644
index 0000000000..021c48a784
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/300-plus.ini
@@ -0,0 +1,8 @@
+#===========================================================
+# Annotations JNDI JAAS processing
+#-----------------------------------------------------------
+OPTIONS=plus
+etc/jetty-plus.xml
+OPTIONS=annotations
+etc/jetty-annotations.xml
+
diff --git a/jetty-distribution/src/main/resources/start.available/300-requestlog.ini b/jetty-distribution/src/main/resources/start.available/300-requestlog.ini
new file mode 100644
index 0000000000..195d2b9468
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/300-requestlog.ini
@@ -0,0 +1,9 @@
+#===========================================================
+# Request logger
+# Will add a handler to log all HTTP requests to a standard
+# request log format file.
+#-----------------------------------------------------------
+requestlog.retain=90
+requestlog.append=true
+requestlog.extended=true
+etc/jetty-requestlog.xml
diff --git a/jetty-distribution/src/main/resources/start.available/400-debug.ini b/jetty-distribution/src/main/resources/start.available/400-debug.ini
new file mode 100644
index 0000000000..d2f69bb810
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/400-debug.ini
@@ -0,0 +1 @@
+etc/jetty-debug.xml
diff --git a/jetty-distribution/src/main/resources/start.available/400-ipaccess.ini b/jetty-distribution/src/main/resources/start.available/400-ipaccess.ini
new file mode 100644
index 0000000000..d272540be4
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/400-ipaccess.ini
@@ -0,0 +1 @@
+etc/jetty-ipaccess.xml
diff --git a/jetty-distribution/src/main/resources/start.available/400-lowresources.ini b/jetty-distribution/src/main/resources/start.available/400-lowresources.ini
new file mode 100644
index 0000000000..c6847804e8
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/400-lowresources.ini
@@ -0,0 +1,11 @@
+#===========================================================
+#-----------------------------------------------------------
+
+lowresources.period=1050
+lowresources.lowResourcesIdleTimeout=200
+lowresources.monitorThreads=true
+lowresources.maxConnections=0
+lowresources.maxMemory=0
+lowresources.maxLowResourcesTime=5000
+etc/jetty-lowresources.xml
+
diff --git a/jetty-distribution/src/main/resources/start.available/400-stats.ini b/jetty-distribution/src/main/resources/start.available/400-stats.ini
new file mode 100644
index 0000000000..1f09e7d70a
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.available/400-stats.ini
@@ -0,0 +1,4 @@
+#===========================================================
+#-----------------------------------------------------------
+etc/jetty-stats.xml
+
diff --git a/jetty-distribution/src/main/resources/start.d/100-jetty.ini b/jetty-distribution/src/main/resources/start.d/100-jetty.ini
new file mode 100644
index 0000000000..cbd5f75a20
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.d/100-jetty.ini
@@ -0,0 +1,16 @@
+#===========================================================
+# Default Server Options
+# Use the core server jars with websocket on the classpath
+# Add the contents of the resources directory to the classpath
+# Add jars discovered in lib/ext to the classpath
+# Include the core jetty configuration file
+#-----------------------------------------------------------
+OPTIONS=Server,websocket,resources,ext
+threads.min=10
+threads.max=200
+threads.timeout=60000
+#jetty.host=myhost.com
+jetty.dump.start=false
+jetty.dump.stop=false
+
+etc/jetty.xml
diff --git a/jetty-distribution/src/main/resources/start.d/110-jmx.ini b/jetty-distribution/src/main/resources/start.d/110-jmx.ini
new file mode 100644
index 0000000000..ce176332b2
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.d/110-jmx.ini
@@ -0,0 +1,10 @@
+#===========================================================
+# JMX Management
+# To enable remote JMX access uncomment jmxremote and
+# enable --exec
+#-----------------------------------------------------------
+OPTIONS=jmx
+# jetty.jmxrmihost=localhost
+# jetty.jmxrmiport=1099
+# -Dcom.sun.management.jmxremote
+etc/jetty-jmx.xml
diff --git a/jetty-distribution/src/main/resources/start.d/110-jsp.ini b/jetty-distribution/src/main/resources/start.d/110-jsp.ini
new file mode 100644
index 0000000000..525fb6214b
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.d/110-jsp.ini
@@ -0,0 +1,5 @@
+#===========================================================
+# Java Server Pages
+#-----------------------------------------------------------
+OPTIONS=jsp
+
diff --git a/jetty-distribution/src/main/resources/start.d/210-http.ini b/jetty-distribution/src/main/resources/start.d/210-http.ini
new file mode 100644
index 0000000000..ee8133306c
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.d/210-http.ini
@@ -0,0 +1,6 @@
+#===========================================================
+# HTTP Connector
+#-----------------------------------------------------------
+jetty.port=8080
+http.timeout=30000
+etc/jetty-http.xml
diff --git a/jetty-distribution/src/main/resources/start.d/500-deploy.ini b/jetty-distribution/src/main/resources/start.d/500-deploy.ini
new file mode 100644
index 0000000000..11e7f03a14
--- /dev/null
+++ b/jetty-distribution/src/main/resources/start.d/500-deploy.ini
@@ -0,0 +1,4 @@
+#===========================================================
+# Webapplication Deployer
+#-----------------------------------------------------------
+etc/jetty-deploy.xml
diff --git a/jetty-distribution/src/main/resources/start.ini b/jetty-distribution/src/main/resources/start.ini
index 382010d19b..bc18db8dcc 100644
--- a/jetty-distribution/src/main/resources/start.ini
+++ b/jetty-distribution/src/main/resources/start.ini
@@ -1,5 +1,6 @@
#===========================================================
# Jetty start.jar arguments
+#
# The contents of this file, together with the start.ini
# fragments found in start.d directory are used to build
# the classpath and command line on a call to
@@ -23,199 +24,8 @@
#
#===========================================================
-#===========================================================
-# The --exec option should be used if any of the JVM options
-# in this file are uncommented (eg -D* or -X*). Because a
-# JVM cannot change it's own options, the --exec flag causes
-# start.jar to fork a new JVM with the requested arguments.
-#
-# Alternately, a command line may be generated by running
-#
-# java -jar start.jar --exec-print
-#
-# and the results executed to start the jetty server.
-# For example --exec can be avoided if jetty is started on unix with
-#
-# eval $(java -jar start.jar --exec-print)
-#
-#-----------------------------------------------------------
-# --exec
-#===========================================================
-
-#===========================================================
-# Configure Properties.
-# The properties defined here may be used by the
-# <Property name="myproperty"/> element in the XML files
-# passed to start.jar.
-# Alternately a file ending with ".properties" can be
-# added that will include multiple properties.
-# Properties, unlike SystemProperties, do not need --exec
-# to be specified.
-#-----------------------------------------------------------
-# jetty.home=.
-# jetty.logs=./logs
-# jetty.host=0.0.0.0
-#===========================================================
-
-
-#===========================================================
-# Configure JVM arguments.
-# Must be used with --exec or --exec-print
-#-----------------------------------------------------------
-# -Dorg.apache.jasper.compiler.disablejsr199=true
-# -Xmx2000m
-# -Xmn512m
-# -verbose:gc
-# -XX:+PrintGCDateStamps
-# -XX:+PrintGCTimeStamps
-# -XX:+PrintGCDetails
-# -XX:+PrintTenuringDistribution
-# -XX:+PrintCommandLineFlags
-# -XX:+DisableExplicitGC
-# -XX:+UseConcMarkSweepGC
-# -XX:ParallelCMSThreads=2
-# -XX:+CMSClassUnloadingEnabled
-# -XX:+UseCMSCompactAtFullCollection
-# -XX:CMSInitiatingOccupancyFraction=80
-#===========================================================
-
-#===========================================================
-# Default Server Options
-# Use the core server jars with websocket on the classpath
-# Add the contents of the resources directory to the classpath
-# Add jars discovered in lib/ext to the classpath
-# Include the core jetty configuration file
-#-----------------------------------------------------------
-OPTIONS=Server,websocket,resources,ext
-etc/jetty.xml
-#===========================================================
-
-#===========================================================
-# Enable SetUID
-# The default user and group is 'jetty' and if you are
-# starting as root you must change the run privledged to true
-#-----------------------------------------------------------
-# OPTIONS=setuid
-# etc/jetty-setuid.xml
-# jetty.startServerAsPrivileged=false
-# jetty.username=jetty
-# jetty.groupname=jetty
-# jetty.umask=002
-#===========================================================
-
-#===========================================================
-# Server logging.
-# The following configuration will redirect stderr and stdout
-# to file which is rolled over daily.
-#-----------------------------------------------------------
-# etc/jetty-logging.xml
-#===========================================================
-
-#===========================================================
-# JMX Management
-# To enable remote JMX access uncomment jmxremote and
-# enable --exec or use --exec-print (see above)
-#-----------------------------------------------------------
-OPTIONS=jmx
-# jetty.jmxrmihost=localhost
-# jetty.jmxrmiport=1099
-# -Dcom.sun.management.jmxremote
-etc/jetty-jmx.xml
-#===========================================================
-
-#===========================================================
-# Java Server Pages
-#-----------------------------------------------------------
-OPTIONS=jsp
-#===========================================================
-
-
-#===========================================================
-# Annotations JNDI JAAS processing
-#-----------------------------------------------------------
-# OPTIONS=plus
-# etc/jetty-plus.xml
-# OPTIONS=annotations
-# etc/jetty-annotations.xml
-#===========================================================
-
-#===========================================================
-# HTTP Connector
-#-----------------------------------------------------------
-# jetty.port=8080
-etc/jetty-http.xml
-#===========================================================
-
-#===========================================================
-# SSL Context
-# For use by HTTPS and SPDY
-#-----------------------------------------------------------
-# jetty.keystore=etc/keystore
-# jetty.keystore.password=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4
-# jetty.keymanager.password=OBF:1u2u1wml1z7s1z7a1wnl1u2g
-# jetty.truststore=etc/keystore
-# jetty.truststore.password=OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4
-# jetty.secure.port=8443
-# etc/jetty-ssl.xml
-#===========================================================
-
-#===========================================================
-# HTTPS Connector
-#-----------------------------------------------------------
-# jetty.https.port=8443
-# etc/jetty-https.xml
-#===========================================================
-
-#===========================================================
-# SPDY Connector
-#
-# SPDY requires the NPN jar which must be separately downloaded:
-#
-# http://repo1.maven.org/maven2/org/mortbay/jetty/npn/npn-boot/1.1.5.v20130313/npn-boot-1.1.5.v20130313.jar
-#
-# Which should be saved in lib/npn-boot-1.1.5.v20130313.jar
-#
-# To include the NPN jar on the boot path, you must either:
-#
-# a) enable --exec above and uncomment the -Xbootclass line
-# below
-#
-# b) Add -Xbootclasspath/p:lib/npn-boot-1.1.5.v20130313.jar
-# to the command line when running jetty.
-#
-#-----------------------------------------------------------
-# OPTIONS=spdy
-# -Xbootclasspath/p:lib/npn-boot-1.1.5.v20130313.jar
-# jetty.spdy.port=8443
-# etc/jetty-spdy.xml
-#===========================================================
-
-#===========================================================
-# Webapplication Deployer
-#-----------------------------------------------------------
-etc/jetty-deploy.xml
-#===========================================================
-
-#===========================================================
-# Request logger
-# Will add a handler to log all HTTP requests to a standard
-# request log format file.
-#-----------------------------------------------------------
-etc/jetty-requestlog.xml
-#===========================================================
-
-#===========================================================
-# Additional configurations
-# See headers of individual files for explanations
-#-----------------------------------------------------------
-# etc/jetty-stats.xml
-# etc/jetty-debug.xml
-# etc/jetty-ipaccess.xml
-# etc/jetty-lowresources.xml
-#===========================================================
-
-#===========================================================
-# Lookup additional ini files in start.d
-#-----------------------------------------------------------
+# The start.d directory contains the active start.ini fragments
start.d/
-#===========================================================
+
+# More start.ini fragments are in start.available and may be
+# enabled by copying or linking to start.d
diff --git a/jetty-distribution/src/main/resources/webapps.demo/README.TXT b/jetty-distribution/src/main/resources/webapps.demo/README.TXT
new file mode 100644
index 0000000000..ec2bea255c
--- /dev/null
+++ b/jetty-distribution/src/main/resources/webapps.demo/README.TXT
@@ -0,0 +1,7 @@
+
+This directory is scanned by the demo WebAppDeployer provider
+created in the etc/jetty-demo.xml file and enabled by the
+start.d/900-demo.ini file.
+
+For normal deployment, use the webapps directory.
+
diff --git a/jetty-distribution/src/main/resources/webapps/ROOT/images/jetty-header.jpg b/jetty-distribution/src/main/resources/webapps.demo/ROOT/images/jetty-header.jpg
index f40c3644cc..f40c3644cc 100644
--- a/jetty-distribution/src/main/resources/webapps/ROOT/images/jetty-header.jpg
+++ b/jetty-distribution/src/main/resources/webapps.demo/ROOT/images/jetty-header.jpg
Binary files differ
diff --git a/jetty-distribution/src/main/resources/webapps/ROOT/images/webtide_logo.jpg b/jetty-distribution/src/main/resources/webapps.demo/ROOT/images/webtide_logo.jpg
index b949919f08..b949919f08 100644
--- a/jetty-distribution/src/main/resources/webapps/ROOT/images/webtide_logo.jpg
+++ b/jetty-distribution/src/main/resources/webapps.demo/ROOT/images/webtide_logo.jpg
Binary files differ
diff --git a/jetty-distribution/src/main/resources/webapps/ROOT/index.html b/jetty-distribution/src/main/resources/webapps.demo/ROOT/index.html
index 826974f243..826974f243 100644
--- a/jetty-distribution/src/main/resources/webapps/ROOT/index.html
+++ b/jetty-distribution/src/main/resources/webapps.demo/ROOT/index.html
diff --git a/jetty-distribution/src/main/resources/webapps/ROOT/jetty.css b/jetty-distribution/src/main/resources/webapps.demo/ROOT/jetty.css
index 90d281a7bf..90d281a7bf 100644
--- a/jetty-distribution/src/main/resources/webapps/ROOT/jetty.css
+++ b/jetty-distribution/src/main/resources/webapps.demo/ROOT/jetty.css
diff --git a/jetty-distribution/src/main/resources/webapps/example-moved.xml b/jetty-distribution/src/main/resources/webapps.demo/example-moved.xml
index 4b176a4467..4b176a4467 100644
--- a/jetty-distribution/src/main/resources/webapps/example-moved.xml
+++ b/jetty-distribution/src/main/resources/webapps.demo/example-moved.xml
diff --git a/jetty-distribution/src/main/resources/webapps/javadoc.xml b/jetty-distribution/src/main/resources/webapps.demo/javadoc.xml
index df854d27ac..df854d27ac 100644
--- a/jetty-distribution/src/main/resources/webapps/javadoc.xml
+++ b/jetty-distribution/src/main/resources/webapps.demo/javadoc.xml
diff --git a/jetty-distribution/src/main/resources/webapps/.donotdelete b/jetty-distribution/src/main/resources/webapps/.donotdelete
deleted file mode 100644
index e69de29bb2..0000000000
--- a/jetty-distribution/src/main/resources/webapps/.donotdelete
+++ /dev/null
diff --git a/jetty-server/src/main/config/etc/jetty-http.xml b/jetty-server/src/main/config/etc/jetty-http.xml
index 731304e7a2..7ae3064a09 100644
--- a/jetty-server/src/main/config/etc/jetty-http.xml
+++ b/jetty-server/src/main/config/etc/jetty-http.xml
@@ -33,7 +33,7 @@
</Arg>
<Set name="host"><Property name="jetty.host" /></Set>
<Set name="port"><Property name="jetty.port" default="8080" /></Set>
- <Set name="idleTimeout">30000</Set>
+ <Set name="idleTimeout"><Property name="http.timeout" default="30000"/></Set>
</New>
</Arg>
</Call>
diff --git a/jetty-server/src/main/config/etc/jetty-lowresources.xml b/jetty-server/src/main/config/etc/jetty-lowresources.xml
index 5b264f1749..060919a8d3 100644
--- a/jetty-server/src/main/config/etc/jetty-lowresources.xml
+++ b/jetty-server/src/main/config/etc/jetty-lowresources.xml
@@ -10,12 +10,12 @@
<Arg>
<New class="org.eclipse.jetty.server.LowResourceMonitor">
<Arg name="server"><Ref refid='Server'/></Arg>
- <Set name="period">1000</Set>
- <Set name="lowResourcesIdleTimeout">200</Set>
- <Set name="monitorThreads">true</Set>
- <Set name="maxConnections">0</Set>
- <Set name="maxMemory">0</Set>
- <Set name="maxLowResourcesTime">5000</Set>
+ <Set name="period"><Property name="lowresources.period" default="1000"/></Set>
+ <Set name="lowResourcesIdleTimeout"><Property name="lowresources.lowResourcesIdleTimeout" default="200"/></Set>
+ <Set name="monitorThreads"><Property name="lowresources.monitorThreads" default="true"/></Set>
+ <Set name="maxConnections"><Property name="lowresources.maxConnections" default="0"/></Set>
+ <Set name="maxMemory"><Property name="lowresources.maxMemory" default="0"/></Set>
+ <Set name="maxLowResourcesTime"><Property name="lowresources.maxLowResourcesTime" default="5000"/></Set>
</New>
</Arg>
</Call>
diff --git a/jetty-server/src/main/config/etc/jetty-requestlog.xml b/jetty-server/src/main/config/etc/jetty-requestlog.xml
index 6e6eb054f0..213177731a 100644
--- a/jetty-server/src/main/config/etc/jetty-requestlog.xml
+++ b/jetty-server/src/main/config/etc/jetty-requestlog.xml
@@ -17,9 +17,9 @@
<New id="RequestLogImpl" class="org.eclipse.jetty.server.AsyncNCSARequestLog">
<Set name="filename"><Property name="jetty.logs" default="./logs" />/yyyy_mm_dd.request.log</Set>
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
- <Set name="retainDays">90</Set>
- <Set name="append">true</Set>
- <Set name="extended">true</Set>
+ <Set name="retainDays"><Property name="requestlog.retain" default="90"/></Set>
+ <Set name="append"><Property name="requestlog.append" default="false"/></Set>
+ <Set name="extended"><Property name="requestlog.extended" default="false"/></Set>
<Set name="logCookies">false</Set>
<Set name="LogTimeZone">GMT</Set>
</New>
diff --git a/jetty-server/src/main/config/etc/jetty.xml b/jetty-server/src/main/config/etc/jetty.xml
index 42b80a3114..a551326cc6 100644
--- a/jetty-server/src/main/config/etc/jetty.xml
+++ b/jetty-server/src/main/config/etc/jetty.xml
@@ -44,9 +44,9 @@
<!-- =========================================================== -->
<Arg name="threadpool">
<New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool">
- <Arg name="minThreads" type="int">10</Arg>
- <Arg name="maxThreads" type="int">200</Arg>
- <Arg name="idleTimeout" type="int">60000</Arg>
+ <Arg name="minThreads" type="int"><Property name="threads.min" default="10"/></Arg>
+ <Arg name="maxThreads" type="int"><Property name="threads.max" default="200"/></Arg>
+ <Arg name="idleTimeout" type="int"><Property name="threads.timeout" default="60000"/></Arg>
<Set name="detailedDump">false</Set>
</New>
</Arg>
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 0be66d81cf..f3931206d3 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
@@ -50,6 +50,8 @@ import java.util.Locale;
import java.util.Properties;
import java.util.Set;
+import javax.naming.OperationNotSupportedException;
+
/*-------------------------------------------*/
/**
* <p>
@@ -175,6 +177,12 @@ public class Main
stop(port,key,timeout);
return null;
}
+
+ if (arg.startsWith("--download="))
+ {
+ download(arg);
+ continue;
+ }
if ("--version".equals(arg) || "-v".equals(arg) || "--info".equals(arg))
{
@@ -302,6 +310,121 @@ public class Main
return xmls;
}
+ private void download(String arg)
+ {
+ try
+ {
+ String[] split = arg.split(":",3);
+ if (split.length!=3 || "http".equalsIgnoreCase(split[0]) || !split[1].startsWith("//"))
+ throw new IllegalArgumentException("Not --download=<http uri>:<location>");
+
+ String location=split[2];
+ if (File.separatorChar!='/')
+ location.replaceAll("/",File.separator);
+ File file = new File(location);
+
+ if (Config.isDebug())
+ System.err.println("Download to "+file.getAbsolutePath()+(file.exists()?" Exists!":""));
+ if (file.exists())
+ return;
+
+ String[] parse = split[1].split("/",4);
+ String host=parse[2];
+ String uri="/"+split[1].substring(3+host.length());
+
+ try (Socket socket = new Socket(host,80))
+ {
+ String request="GET "+uri+" HTTP/1.0\r\n"+
+ "Host: "+host+"\r\n"+
+ "User-Agent: jetty-start.jar\r\n"+
+ "\r\n";
+
+ socket.getOutputStream().write(request.getBytes("ISO-8859-1"));
+ socket.getOutputStream().flush();
+
+ InputStream in = socket.getInputStream();
+
+ int state=0;
+ loop: while (state>=0)
+ {
+ char c = (char)in.read();
+
+ switch (state)
+ {
+ case 0:
+ c=Character.toLowerCase(c);
+ if (c==' ')
+ state=1;
+ else if (c!='h' && c!='t' && c!='p' && c!='/' && c!='.' && !Character.isDigit(c))
+ break loop;
+ break;
+ case 1:
+ if (c==' ')
+ state=2;
+ else if (c!='2' && c!='0')
+ break loop;
+ break;
+ case 2:
+ if (c=='\r')
+ state=3;
+ else if (c=='\n')
+ state=4;
+ break;
+ case 3:
+ if (c=='\n')
+ state=4;
+ else if (c=='\r')
+ state=-1;
+ break;
+
+ case 4:
+ if (c=='\r')
+ state=5;
+ else if (c=='\n')
+ state=-1;
+ else
+ state=2;
+ break;
+
+ case 5:
+ if (c=='\n')
+ state=-1;
+ else
+ state=2;
+ break;
+ }
+ }
+
+ if (state>=0)
+ throw new IOException("Bad HTTP response: "+state);
+
+ System.err.println("DOWNLOAD: "+uri+" from "+host+" to "+location);
+ if (!file.getParentFile().exists())
+ file.getParentFile().mkdirs();
+
+ byte[] buf=new byte[8192];
+ try (OutputStream out = new FileOutputStream(file))
+ {
+ while(!socket.isInputShutdown())
+ {
+ int len = in.read(buf);
+
+ if (len>0)
+ out.write(buf,0,len);
+ if (len<0)
+ break;
+ }
+ }
+ }
+ }
+ catch(Exception e)
+ {
+ System.err.println("ERROR: processing "+arg+"\n"+e);
+ e.printStackTrace();
+ usageExit(EXIT_USAGE);
+ }
+ }
+
private void usage()
{
String usageResource = "org/eclipse/jetty/start/usage.txt";
diff --git a/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt b/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt
index 7272c5f674..e25a73d277 100644
--- a/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt
+++ b/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt
@@ -45,6 +45,10 @@ Command Line Options:
and additional .ini files in jetty.home/start.d/
will NOT be read. A --ini option with no file indicates that
start.ini should not be read.
+
+ --download=<http-uri>:location
+ If the file does not exist at the given location, then
+ download it from the given http URI
System Properties:
These are set with a command line like "java -Dname=value ..." and are
diff --git a/tests/test-webapps/test-jaas-webapp/src/main/config/webapps/test-jaas.xml b/tests/test-webapps/test-jaas-webapp/src/main/config/webapps.demo/test-jaas.xml
index 1720ba911b..1720ba911b 100644
--- a/tests/test-webapps/test-jaas-webapp/src/main/config/webapps/test-jaas.xml
+++ b/tests/test-webapps/test-jaas-webapp/src/main/config/webapps.demo/test-jaas.xml
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/etc/jetty-demo.xml b/tests/test-webapps/test-jetty-webapp/src/main/config/etc/jetty-demo.xml
new file mode 100644
index 0000000000..938e7cf213
--- /dev/null
+++ b/tests/test-webapps/test-jetty-webapp/src/main/config/etc/jetty-demo.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
+
+<!-- =============================================================== -->
+<!-- Create the demo deployment provider -->
+<!-- =============================================================== -->
+<Configure id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
+ <Call id="webappprovider" name="addAppProvider">
+ <Arg>
+ <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
+ <Set name="monitoredDirName"><Property name="jetty.home" default="." />/webapps.demo</Set>
+ <Set name="defaultsDescriptor"><Property name="jetty.home" default="." />/etc/webdefault.xml</Set>
+ <Set name="scanInterval">1</Set>
+ <Set name="extractWars">true</Set>
+ <Set name="configurationManager">
+ <New class="org.eclipse.jetty.deploy.PropertiesConfigurationManager"/>
+ </Set>
+ </New>
+ </Arg>
+ </Call>
+</Configure>
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/start.d/test-webapp.ini b/tests/test-webapps/test-jetty-webapp/src/main/config/start.d/900-demo.ini
index 2c4006b6bc..95e58b53ae 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/config/start.d/test-webapp.ini
+++ b/tests/test-webapps/test-jetty-webapp/src/main/config/start.d/900-demo.ini
@@ -1,3 +1,4 @@
# Enabled services and configuration needed by the test webapp
OPTIONS=client
etc/test-realm.xml
+etc/jetty-demo.xml
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/webapps/test.d/override-web.xml b/tests/test-webapps/test-jetty-webapp/src/main/config/webapps.demo/test.d/override-web.xml
index 08327c5dcb..08327c5dcb 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/config/webapps/test.d/override-web.xml
+++ b/tests/test-webapps/test-jetty-webapp/src/main/config/webapps.demo/test.d/override-web.xml
diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/webapps/test.xml b/tests/test-webapps/test-jetty-webapp/src/main/config/webapps.demo/test.xml
index ff7eb6b805..44cbce55c3 100644
--- a/tests/test-webapps/test-jetty-webapp/src/main/config/webapps/test.xml
+++ b/tests/test-webapps/test-jetty-webapp/src/main/config/webapps.demo/test.xml
@@ -19,15 +19,15 @@ detected.
<!-- + war OR resourceBase -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="contextPath">/test</Set>
- <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/test.war</Set>
+ <Set name="war"><Property name="jetty.webapps" default="."/>/test.war</Set>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Optional context configuration -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
- <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
- <Set name="overrideDescriptor"><SystemProperty name="jetty.home" default="."/>/webapps/test.d/override-web.xml</Set>
+ <Set name="defaultsDescriptor"><Property name="jetty.home" default="."/>/etc/webdefault.xml</Set>
+ <Set name="overrideDescriptor"><Property name="jetty.webapps" default="."/>/test.d/override-web.xml</Set>
<!-- Allow directory symbolic links -->
<Call name="addAliasCheck">

Back to the top