jetty-9 distribution working

This commit is contained in:
Greg Wilkins 2012-09-06 14:54:55 +10:00
parent 3acf2e65ed
commit 2dfcebfc04
32 changed files with 237 additions and 183 deletions

View File

@ -34,7 +34,7 @@ import org.eclipse.jetty.server.LocalConnector;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.AbstractHandler;
import org.eclipse.jetty.server.handler.GzipHandler;
import org.eclipse.jetty.servlets.gzip.GzipHandler;
import org.eclipse.jetty.util.IO;
import org.junit.After;
import org.junit.Before;

View File

@ -0,0 +1,3 @@
OPTIONS=annotations
etc/jetty-annotations.xml

View File

@ -15,18 +15,10 @@
<!-- Server Thread Pool -->
<!-- =========================================================== -->
<Arg name="threadPool">
<!-- Default queued blocking threadpool -->
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="maxThreads">200</Set>
<Set name="minThreads">10</Set>
</New>
<!-- Optional Java 5 bounded threadpool with job queue
<New class="org.eclipse.thread.concurrent.ThreadPool">
<Set name="corePoolSize">50</Set>
<Set name="maximumPoolSize">50</Set>
</New>
-->
</Arg>
<!-- =========================================================== -->

View File

@ -343,22 +343,24 @@
<version>${project.version}</version>
</dependency>
<!--
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jsp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-rewrite</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-annotations</artifactId>
<version>${project.version}</version>
</dependency>
<!--
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-rewrite</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jndi</artifactId>

View File

@ -9,7 +9,6 @@ to serve static html files and images.
-->
<Configure class="org.eclipse.jetty.server.handler.ContextHandler">
<Call class="org.eclipse.jetty.util.log.Log" name="debug"><Arg>Configure javadoc.xml</Arg></Call>
<Set name="contextPath">/resources</Set>
<Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/resources/</Set>
<Set name="handler">

View File

@ -9,7 +9,6 @@ to serve static html files and images.
-->
<Configure class="org.eclipse.jetty.server.handler.ContextHandler">
<Call class="org.eclipse.jetty.util.log.Log" name="debug"><Arg>Configure javadoc.xml</Arg></Call>
<Set name="contextPath">/javadoc</Set>
<Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/javadoc/</Set>
<Set name="handler">

View File

@ -1,8 +1,13 @@
#===========================================================
# Jetty start.jar arguments
# Each line of this file is prepended to the command line
# arguments # of a call to:
# 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
# java -jar start.jar [arg...]
#
# Use the following command to see more options
# java -jar start.jar --help
#
#===========================================================
@ -46,7 +51,7 @@
# for a full listing do
# java -jar start.jar --list-options
#-----------------------------------------------------------
OPTIONS=Server,jsp,jmx,resources,websocket,ext,plus,annotations
OPTIONS=Server,jsp,resources,websocket,ext,plus
#-----------------------------------------------------------
@ -55,9 +60,7 @@ OPTIONS=Server,jsp,jmx,resources,websocket,ext,plus,annotations
# For a full list of available configuration files do
# java -jar start.jar --help
#-----------------------------------------------------------
#etc/jetty-jmx.xml
etc/jetty.xml
etc/jetty-annotations.xml
# etc/jetty-ssl.xml
# etc/jetty-requestlog.xml
etc/jetty-deploy.xml

View File

@ -7,7 +7,7 @@
<!-- The simplest way to achieve this is to add etc/jetty-jmx.xml as the -->
<!-- first file in configuration file list at the end of start.ini file. -->
<!-- ============================================================================ -->
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Configure id="Container" class="org.eclipse.jetty.util.component.Container">
<!-- =========================================================== -->
<!-- Set the java.rmi.server.hostname property in case you've -->
@ -21,7 +21,7 @@
-->
<!-- =========================================================== -->
<!-- Initialize an mbean server -->
<!-- Get the platform mbean server -->
<!-- =========================================================== -->
<Call id="MBeanServer" class="java.lang.management.ManagementFactory"
name="getPlatformMBeanServer" />
@ -35,17 +35,9 @@
</New>
<!-- Add to the Server to listen for object events -->
<Get id="Container" name="container">
<Call name="addEventListener">
<Arg><Ref id="MBeanContainer" /></Arg>
</Call>
</Get>
<!-- Add to the Server as a managed lifecycle -->
<Call name="addBean">
<Arg><Ref id="MBeanContainer"/></Arg>
<Arg type="boolean">true</Arg>
</Call>
<!-- Add the static log -->
<Ref id="MBeanContainer">

View File

@ -0,0 +1,2 @@
OPTIONS=jmx
etc/jetty-jmx.xml

View File

@ -2,5 +2,7 @@
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Call class="org.eclipse.jetty.util.log.Log" name="info"><Arg>Executing jetty-web.xml for <Property name="overlay.instance"/></Arg></Call>
<Get class="org.eclipse.jetty.util.log.Log" name="rootLogger">
<Call name="info"><Arg>Executing jetty-web.xml for <Property name="overlay.instance"/></Arg></Call>
</Get>
</Configure>

View File

@ -1,5 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<!-- =============================================================== -->
<!-- Configure the Jetty Server -->
@ -16,32 +17,28 @@
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<!-- =========================================================== -->
<!-- Server Thread Pool -->
<!-- =========================================================== -->
<Set name="ThreadPool">
<!-- Default queued blocking threadpool -->
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Arg name="threadpool">
<New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Set name="minThreads">10</Set>
<Set name="maxThreads">200</Set>
<Set name="detailedDump">false</Set>
</New>
</Set>
</Arg>
<Arg name="container"><Ref id="Container"/></Arg>
<!-- =========================================================== -->
<!-- Set connectors -->
<!-- =========================================================== -->
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.SelectChannelConnector">
<Arg name="server"><Ref id="Server" /></Arg>
<Set name="host"><Property name="jetty.host" /></Set>
<Set name="port"><Property name="jetty.port" default="8080"/></Set>
<Set name="idleTimeout">300000</Set>
<Set name="Acceptors">2</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
</New>
</Arg>
</Call>

View File

@ -58,12 +58,12 @@ public class SelectChannelConnector extends AbstractNetworkConnector
private volatile boolean _reuseAddress = true;
private volatile int _lingerTime = -1;
public SelectChannelConnector(Server server)
public SelectChannelConnector(@Name("server") Server server)
{
this(server, null);
}
public SelectChannelConnector(Server server, SslContextFactory sslContextFactory)
public SelectChannelConnector(@Name("server")Server server, @Name("sslContextFactory") SslContextFactory sslContextFactory)
{
this(server, null, null, null, sslContextFactory, 0, 0);
}

View File

@ -47,6 +47,7 @@ import org.eclipse.jetty.util.TypeUtil;
import org.eclipse.jetty.util.URIUtil;
import org.eclipse.jetty.util.annotation.ManagedAttribute;
import org.eclipse.jetty.util.annotation.ManagedObject;
import org.eclipse.jetty.util.annotation.Name;
import org.eclipse.jetty.util.component.Container;
import org.eclipse.jetty.util.component.Destroyable;
import org.eclipse.jetty.util.component.Graceful;
@ -80,7 +81,7 @@ public class Server extends HandlerWrapper implements Attributes
__version=System.getProperty("jetty.version","9.x.y.z-SNAPSHOT");
}
private final Container _container=new Container();
private final Container _container;
private final AttributesMap _attributes = new AttributesMap();
private final ThreadPool _threadPool;
private final List<Connector> _connectors = new CopyOnWriteArrayList<>();
@ -102,7 +103,7 @@ public class Server extends HandlerWrapper implements Attributes
/** Convenience constructor
* Creates server and a {@link SelectChannelConnector} at the passed port.
*/
public Server(int port)
public Server(@Name("port")int port)
{
this((ThreadPool)null);
SelectChannelConnector connector=new SelectChannelConnector(this);
@ -114,7 +115,7 @@ public class Server extends HandlerWrapper implements Attributes
/** Convenience constructor
* Creates server and a {@link SelectChannelConnector} at the passed address.
*/
public Server(InetSocketAddress addr)
public Server(@Name("address")InetSocketAddress addr)
{
this((ThreadPool)null);
SelectChannelConnector connector=new SelectChannelConnector(this);
@ -125,9 +126,16 @@ public class Server extends HandlerWrapper implements Attributes
/* ------------------------------------------------------------ */
public Server(ThreadPool pool)
public Server(@Name("threadpool") ThreadPool pool)
{
this(pool,null);
}
/* ------------------------------------------------------------ */
public Server(@Name("threadpool") ThreadPool pool,@Name("container") Container container)
{
_threadPool=pool!=null?pool:new QueuedThreadPool();
_container=container!=null?container:new Container();
addBean(_threadPool);
setServer(this);
}

View File

@ -167,7 +167,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
private Map<String, Object> _managedAttributes;
private String[] _protectedTargets;
public enum Availability { AVAILABLE,SHUTDOWN,UNAVAILABLE};
public enum Availability { UNAVAILABLE,STARTING,AVAILABLE,SHUTDOWN,};
private volatile Availability _availability;
/* ------------------------------------------------------------ */
@ -666,7 +666,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
@Override
protected void doStart() throws Exception
{
_availability = Availability.UNAVAILABLE;
_availability = Availability.STARTING;
if (_contextPath == null)
throw new IllegalStateException("Null contextPath");
@ -696,6 +696,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
startContext();
_availability = Availability.AVAILABLE;
LOG.info("started {}",this);
}
finally
{
@ -756,7 +757,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
public void callContextInitialized (ServletContextListener l, ServletContextEvent e)
{
l.contextInitialized(e);
LOG.info("started {}",this);
}
/* ------------------------------------------------------------ */

View File

@ -38,8 +38,8 @@ import org.eclipse.jetty.continuation.Continuation;
import org.eclipse.jetty.continuation.ContinuationListener;
import org.eclipse.jetty.continuation.ContinuationSupport;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.server.gzip.AbstractCompressedStream;
import org.eclipse.jetty.server.gzip.CompressedResponseWrapper;
import org.eclipse.jetty.servlets.gzip.AbstractCompressedStream;
import org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;

View File

@ -32,8 +32,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.io.UncheckedPrintWriter;
import org.eclipse.jetty.server.gzip.AbstractCompressedStream;
import org.eclipse.jetty.server.gzip.CompressedResponseWrapper;
import org.eclipse.jetty.servlets.gzip.AbstractCompressedStream;
import org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper;
/* ------------------------------------------------------------ */
/** Includable GZip Filter.

View File

@ -16,7 +16,7 @@
// ========================================================================
//
package org.eclipse.jetty.server.gzip;
package org.eclipse.jetty.servlets.gzip;
import java.io.IOException;
import java.io.OutputStream;

View File

@ -16,7 +16,7 @@
// ========================================================================
//
package org.eclipse.jetty.server.gzip;
package org.eclipse.jetty.servlets.gzip;
import java.io.IOException;
import java.io.OutputStream;
@ -58,7 +58,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#setMimeTypes(java.util.Set)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#setMimeTypes(java.util.Set)
*/
public void setMimeTypes(Set<String> mimeTypes)
{
@ -67,7 +67,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#setBufferSize(int)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#setBufferSize(int)
*/
@Override
public void setBufferSize(int bufferSize)
@ -77,7 +77,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#setMinCompressSize(int)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#setMinCompressSize(int)
*/
public void setMinCompressSize(int minCompressSize)
{
@ -86,7 +86,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#setContentType(java.lang.String)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#setContentType(java.lang.String)
*/
@Override
public void setContentType(String ct)
@ -110,7 +110,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#setStatus(int, java.lang.String)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#setStatus(int, java.lang.String)
*/
@Override
public void setStatus(int sc, String sm)
@ -122,7 +122,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#setStatus(int)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#setStatus(int)
*/
@Override
public void setStatus(int sc)
@ -134,7 +134,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#setContentLength(int)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#setContentLength(int)
*/
@Override
public void setContentLength(int length)
@ -164,7 +164,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#addHeader(java.lang.String, java.lang.String)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#addHeader(java.lang.String, java.lang.String)
*/
@Override
public void addHeader(String name, String value)
@ -193,7 +193,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#flushBuffer()
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#flushBuffer()
*/
@Override
public void flushBuffer() throws IOException
@ -208,7 +208,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#reset()
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#reset()
*/
@Override
public void reset()
@ -224,7 +224,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#resetBuffer()
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#resetBuffer()
*/
@Override
public void resetBuffer()
@ -238,7 +238,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#sendError(int, java.lang.String)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#sendError(int, java.lang.String)
*/
@Override
public void sendError(int sc, String msg) throws IOException
@ -249,7 +249,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#sendError(int)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#sendError(int)
*/
@Override
public void sendError(int sc) throws IOException
@ -260,7 +260,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#sendRedirect(java.lang.String)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#sendRedirect(java.lang.String)
*/
@Override
public void sendRedirect(String location) throws IOException
@ -271,7 +271,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#noCompression()
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#noCompression()
*/
public void noCompression()
{
@ -291,7 +291,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#finish()
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#finish()
*/
public void finish() throws IOException
{
@ -303,7 +303,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#setHeader(java.lang.String, java.lang.String)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#setHeader(java.lang.String, java.lang.String)
*/
@Override
public void setHeader(String name, String value)
@ -330,7 +330,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#getOutputStream()
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#getOutputStream()
*/
@Override
public ServletOutputStream getOutputStream() throws IOException
@ -353,7 +353,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#getWriter()
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#getWriter()
*/
@Override
public PrintWriter getWriter() throws IOException
@ -377,7 +377,7 @@ public abstract class CompressedResponseWrapper extends HttpServletResponseWrapp
/* ------------------------------------------------------------ */
/**
* @see org.eclipse.jetty.server.gzip.CompressedResponseWrapper#setIntHeader(java.lang.String, int)
* @see org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper#setIntHeader(java.lang.String, int)
*/
@Override
public void setIntHeader(String name, int value)

View File

@ -16,7 +16,7 @@
// ========================================================================
//
package org.eclipse.jetty.server.handler;
package org.eclipse.jetty.servlets.gzip;
import java.io.IOException;
import java.io.OutputStream;
@ -38,8 +38,9 @@ import org.eclipse.jetty.continuation.ContinuationListener;
import org.eclipse.jetty.continuation.ContinuationSupport;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.gzip.AbstractCompressedStream;
import org.eclipse.jetty.server.gzip.CompressedResponseWrapper;
import org.eclipse.jetty.servlets.gzip.AbstractCompressedStream;
import org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper;
import org.eclipse.jetty.server.handler.HandlerWrapper;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;

View File

@ -24,8 +24,8 @@ import java.util.List;
import javax.servlet.Servlet;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.server.gzip.CompressedResponseWrapper;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper;
import org.eclipse.jetty.servlets.gzip.GzipTester;
import org.eclipse.jetty.servlets.gzip.TestServletLengthStreamTypeWrite;
import org.eclipse.jetty.servlets.gzip.TestServletLengthTypeStreamWrite;

View File

@ -27,9 +27,9 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.server.gzip.CompressedResponseWrapper;
import org.eclipse.jetty.servlet.DefaultServlet;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper;
import org.eclipse.jetty.servlets.gzip.GzipTester;
import org.eclipse.jetty.toolchain.test.TestingDir;
import org.eclipse.jetty.util.log.Log;

View File

@ -142,8 +142,8 @@ public class Main
{
List<String> ini_args=new ArrayList<String>();
File start_ini = new File(_jettyHome,"start.ini");
if (start_ini.exists())
ini_args.addAll(loadStartIni(start_ini));
boolean start_ini_processed=!start_ini.exists();
File start_d = new File(_jettyHome,"start.d");
if (start_d.isDirectory())
@ -156,9 +156,21 @@ public class Main
}
});
Arrays.sort(inis);
for (File i : inis)
{
if (!start_ini_processed && i.getName().charAt(0)>'0')
{
start_ini_processed=true;
ini_args.addAll(loadStartIni(start_ini));
}
ini_args.addAll(loadStartIni(i));
}
}
if (!start_ini_processed )
ini_args.addAll(loadStartIni(start_ini));
return ini_args;
}
@ -392,7 +404,7 @@ public class Main
}
else if (info.equals("@STARTINI"))
{
List<String> ini = loadStartIni(new File(_jettyHome,"start.ini"));
List<String> ini = parseStartIniFiles();
if (ini != null && ini.size() > 0)
{
for (String a : ini)

View File

@ -146,7 +146,8 @@ $(jetty.home)/lib/jetty-client-$(version).jar
$(jetty.home)/lib/jetty-http-$(version).jar ! available org.eclipse.jetty.http.HttpParser
[All,websocket]
$(jetty.home)/lib/jetty-websocket-$(version).jar ! available org.eclipse.jetty.websocket.WebSocket
$(jetty.home)/lib/websocket-core-$(version).jar ! available org.eclipse.jetty.websocket.api.WebSocketConnection
$(jetty.home)/lib/websocket-server-$(version).jar ! available org.eclipse.jetty.websocket.server.WebSocketServlet
[All,overlay,overlays]
$(jetty.home)/lib/jetty-overlay-deployer-$(version).jar ! available org.eclipse.jetty.overlay.OverlayedAppProvider

View File

@ -120,9 +120,12 @@ Defaults:
which are used if no command line arguments are provided and override
the defaults in the start.config file. If the directory jetty.home/start.d
exists, then multiple *.ini files will be read from that directory in
alphabetical order. If --ini options are provided on the command line,
then start.ini and start.d will NOT be read.
alphabetical order. The contents of start.ini are processed after any
start.d files starting with a character <= "0".
The current start.ini arguments are:
If --ini options are provided on the command line, then start.ini and
start.d will NOT be read.
The current start.ini/start.d arguments are:
@STARTINI@

View File

@ -22,7 +22,9 @@
</Arg>
</New>
<Call class="org.eclipse.jetty.util.log.Log" name="info"><Arg>Redirecting stderr/stdout to <Ref id="ServerLogName"/></Arg></Call>
<Get class="org.eclipse.jetty.util.log.Log" name="rootLogger">
<Call name="info"><Arg>Redirecting stderr/stdout to <Ref id="ServerLogName"/></Arg></Call>
</Get>
<Call class="java.lang.System" name="setErr"><Arg><Ref id="ServerLog"/></Arg></Call>
<Call class="java.lang.System" name="setOut"><Arg><Ref id="ServerLog"/></Arg></Call>

View File

@ -107,8 +107,7 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
"org.eclipse.jetty.continuation.", // webapp cannot change continuation classes
"org.eclipse.jetty.jndi.", // webapp cannot change naming classes
"org.eclipse.jetty.plus.jaas.", // webapp cannot change jaas classes
"org.eclipse.jetty.websocket.WebSocket", // WebSocket is a jetty extension
"org.eclipse.jetty.websocket.WebSocketFactory", // WebSocket is a jetty extension
"org.eclipse.jetty.websocket.", // WebSocket is a jetty extension
"org.eclipse.jetty.servlet.DefaultServlet" // webapp cannot change default servlets
} ;
@ -121,8 +120,7 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
"-org.eclipse.jetty.continuation.", // don't hide continuation classes
"-org.eclipse.jetty.jndi.", // don't hide naming classes
"-org.eclipse.jetty.plus.jaas.", // don't hide jaas classes
"-org.eclipse.jetty.websocket.WebSocket", // WebSocket is a jetty extension
"-org.eclipse.jetty.websocket.WebSocketFactory", // WebSocket is a jetty extension
"-org.eclipse.jetty.websocket.", // WebSocket is a jetty extension
"-org.eclipse.jetty.servlet.DefaultServlet", // don't hide default servlet
"-org.eclipse.jetty.servlet.listener.", // don't hide useful listeners
"org.eclipse.jetty." // hide other jetty classes
@ -855,13 +853,18 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
}
}
/* ------------------------------------------------------------ */
@Override
public String toString()
{
return super.toString()+(_war==null?"":(","+_war));
if (_war!=null)
{
String war=_war;
if (war.indexOf("/webapps/")>=0)
war=war.substring(war.indexOf("/webapps/")+8);
return super.toString()+"{"+war+"}";
}
return super.toString();
}
/* ------------------------------------------------------------ */

View File

@ -346,6 +346,22 @@ public class XmlConfiguration
if (id != null)
_idMap.put(id,obj);
// Object already constructed so skip any arguments
for (; i < cfg.size(); i++)
{
Object o = cfg.get(i);
if (o instanceof String)
continue;
XmlParser.Node node = (XmlParser.Node)o;
if ("Arg".equals(node.getTag()))
{
LOG.warn("Ignored arg: "+node);
continue;
}
break;
}
// Process real arguments
for (; i < cfg.size(); i++)
{
Object o = cfg.get(i);

View File

@ -26,6 +26,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.jetty.util.annotation.Name;
import org.junit.Ignore;
@Ignore
@ -33,6 +34,7 @@ public class TestConfiguration extends HashMap<String,Object>
{
public static int VALUE=77;
public final String name;
public TestConfiguration nested;
public Object testObject;
public int testInt;
@ -50,6 +52,18 @@ public class TestConfiguration extends HashMap<String,Object>
private ConstructorArgTestClass constructorArgTestClass;
public Map map;
public TestConfiguration()
{
this("");
}
public TestConfiguration(@Name("name") String n)
{
name=n;
}
public void setTest(Object value)
{
testObject=value;
@ -73,7 +87,7 @@ public class TestConfiguration extends HashMap<String,Object>
public TestConfiguration call(Boolean b)
{
nested=new TestConfiguration();
nested=new TestConfiguration("called-"+name);
nested.put("Arg",b);
return nested;
}

View File

@ -56,7 +56,7 @@ public class XmlConfigurationTest
URL url = XmlConfigurationTest.class.getClassLoader().getResource(_configure);
XmlConfiguration configuration = new XmlConfiguration(url);
TestConfiguration tc = new TestConfiguration();
TestConfiguration tc = new TestConfiguration("tc");
configuration.getProperties().putAll(properties);
configuration.configure(tc);

View File

@ -2,6 +2,7 @@
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure class="org.eclipse.jetty.xml.TestConfiguration">
<Arg name="name">name</Arg>
<Set name="Test">SetValue</Set>
<Set name="Test" type="int"><Property name="does.not.exist" default="2"/></Set>

View File

@ -378,8 +378,11 @@
<module>jetty-annotations</module>
<module>jetty-jndi</module>
<module>jetty-jsp</module>
<module>jetty-distribution</module>
<module>jetty-spring</module>
<!-- modules that need fixed and added back, or simply dropped and not maintained
<module>jetty-runner</module>
@ -533,7 +536,6 @@
<!--
<module>jetty-aggregate</module>
-->
<module>jetty-distribution</module>
</modules>
</profile>
<profile>