jetty-9 distribution working
This commit is contained in:
parent
3acf2e65ed
commit
2dfcebfc04
|
@ -34,7 +34,7 @@ import org.eclipse.jetty.server.LocalConnector;
|
||||||
import org.eclipse.jetty.server.Request;
|
import org.eclipse.jetty.server.Request;
|
||||||
import org.eclipse.jetty.server.Server;
|
import org.eclipse.jetty.server.Server;
|
||||||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
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.eclipse.jetty.util.IO;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
OPTIONS=annotations
|
||||||
|
etc/jetty-annotations.xml
|
||||||
|
|
|
@ -15,18 +15,10 @@
|
||||||
<!-- Server Thread Pool -->
|
<!-- Server Thread Pool -->
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<Arg name="threadPool">
|
<Arg name="threadPool">
|
||||||
<!-- Default queued blocking threadpool -->
|
|
||||||
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
|
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
|
||||||
<Set name="maxThreads">200</Set>
|
<Set name="maxThreads">200</Set>
|
||||||
<Set name="minThreads">10</Set>
|
<Set name="minThreads">10</Set>
|
||||||
</New>
|
</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>
|
</Arg>
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
|
|
|
@ -343,22 +343,24 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-jsp</artifactId>
|
<artifactId>jetty-jsp</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-rewrite</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-annotations</artifactId>
|
<artifactId>jetty-annotations</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
<artifactId>jetty-rewrite</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-jndi</artifactId>
|
<artifactId>jetty-jndi</artifactId>
|
||||||
|
|
|
@ -9,7 +9,6 @@ to serve static html files and images.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Configure class="org.eclipse.jetty.server.handler.ContextHandler">
|
<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="contextPath">/resources</Set>
|
||||||
<Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/resources/</Set>
|
<Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/resources/</Set>
|
||||||
<Set name="handler">
|
<Set name="handler">
|
||||||
|
|
|
@ -9,7 +9,6 @@ to serve static html files and images.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Configure class="org.eclipse.jetty.server.handler.ContextHandler">
|
<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="contextPath">/javadoc</Set>
|
||||||
<Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/javadoc/</Set>
|
<Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/javadoc/</Set>
|
||||||
<Set name="handler">
|
<Set name="handler">
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
#===========================================================
|
#===========================================================
|
||||||
# Jetty start.jar arguments
|
# Jetty start.jar arguments
|
||||||
# Each line of this file is prepended to the command line
|
# The contents of this file, together with the start.ini
|
||||||
# arguments # of a call to:
|
# fragments found in start.d directory are used to build
|
||||||
|
# the classpath and command line on a call to
|
||||||
# java -jar start.jar [arg...]
|
# 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
|
# for a full listing do
|
||||||
# java -jar start.jar --list-options
|
# 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
|
# For a full list of available configuration files do
|
||||||
# java -jar start.jar --help
|
# java -jar start.jar --help
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
#etc/jetty-jmx.xml
|
|
||||||
etc/jetty.xml
|
etc/jetty.xml
|
||||||
etc/jetty-annotations.xml
|
|
||||||
# etc/jetty-ssl.xml
|
# etc/jetty-ssl.xml
|
||||||
# etc/jetty-requestlog.xml
|
# etc/jetty-requestlog.xml
|
||||||
etc/jetty-deploy.xml
|
etc/jetty-deploy.xml
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<!-- The simplest way to achieve this is to add etc/jetty-jmx.xml as the -->
|
<!-- 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. -->
|
<!-- 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 -->
|
<!-- 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"
|
<Call id="MBeanServer" class="java.lang.management.ManagementFactory"
|
||||||
name="getPlatformMBeanServer" />
|
name="getPlatformMBeanServer" />
|
||||||
|
@ -35,17 +35,9 @@
|
||||||
</New>
|
</New>
|
||||||
|
|
||||||
<!-- Add to the Server to listen for object events -->
|
<!-- Add to the Server to listen for object events -->
|
||||||
<Get id="Container" name="container">
|
|
||||||
<Call name="addEventListener">
|
<Call name="addEventListener">
|
||||||
<Arg><Ref id="MBeanContainer" /></Arg>
|
<Arg><Ref id="MBeanContainer" /></Arg>
|
||||||
</Call>
|
</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 -->
|
<!-- Add the static log -->
|
||||||
<Ref id="MBeanContainer">
|
<Ref id="MBeanContainer">
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
OPTIONS=jmx
|
||||||
|
etc/jetty-jmx.xml
|
|
@ -2,5 +2,7 @@
|
||||||
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
|
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
|
||||||
|
|
||||||
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
|
<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>
|
</Configure>
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0"?>
|
<?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 -->
|
<!-- Configure the Jetty Server -->
|
||||||
|
@ -16,32 +17,28 @@
|
||||||
|
|
||||||
|
|
||||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Server Thread Pool -->
|
<!-- Server Thread Pool -->
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<Set name="ThreadPool">
|
<Arg name="threadpool">
|
||||||
<!-- Default queued blocking threadpool -->
|
<New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool">
|
||||||
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
|
|
||||||
<Set name="minThreads">10</Set>
|
<Set name="minThreads">10</Set>
|
||||||
<Set name="maxThreads">200</Set>
|
<Set name="maxThreads">200</Set>
|
||||||
<Set name="detailedDump">false</Set>
|
<Set name="detailedDump">false</Set>
|
||||||
</New>
|
</New>
|
||||||
</Set>
|
</Arg>
|
||||||
|
<Arg name="container"><Ref id="Container"/></Arg>
|
||||||
|
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
<!-- Set connectors -->
|
<!-- Set connectors -->
|
||||||
<!-- =========================================================== -->
|
<!-- =========================================================== -->
|
||||||
|
|
||||||
<Call name="addConnector">
|
<Call name="addConnector">
|
||||||
<Arg>
|
<Arg>
|
||||||
<New class="org.eclipse.jetty.server.SelectChannelConnector">
|
<New class="org.eclipse.jetty.server.SelectChannelConnector">
|
||||||
|
<Arg name="server"><Ref id="Server" /></Arg>
|
||||||
<Set name="host"><Property name="jetty.host" /></Set>
|
<Set name="host"><Property name="jetty.host" /></Set>
|
||||||
<Set name="port"><Property name="jetty.port" default="8080"/></Set>
|
<Set name="port"><Property name="jetty.port" default="8080"/></Set>
|
||||||
<Set name="idleTimeout">300000</Set>
|
<Set name="idleTimeout">300000</Set>
|
||||||
<Set name="Acceptors">2</Set>
|
|
||||||
<Set name="statsOn">false</Set>
|
|
||||||
<Set name="confidentialPort">8443</Set>
|
|
||||||
</New>
|
</New>
|
||||||
</Arg>
|
</Arg>
|
||||||
</Call>
|
</Call>
|
||||||
|
|
|
@ -58,12 +58,12 @@ public class SelectChannelConnector extends AbstractNetworkConnector
|
||||||
private volatile boolean _reuseAddress = true;
|
private volatile boolean _reuseAddress = true;
|
||||||
private volatile int _lingerTime = -1;
|
private volatile int _lingerTime = -1;
|
||||||
|
|
||||||
public SelectChannelConnector(Server server)
|
public SelectChannelConnector(@Name("server") Server server)
|
||||||
{
|
{
|
||||||
this(server, null);
|
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);
|
this(server, null, null, null, sslContextFactory, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ import org.eclipse.jetty.util.TypeUtil;
|
||||||
import org.eclipse.jetty.util.URIUtil;
|
import org.eclipse.jetty.util.URIUtil;
|
||||||
import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
||||||
import org.eclipse.jetty.util.annotation.ManagedObject;
|
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.Container;
|
||||||
import org.eclipse.jetty.util.component.Destroyable;
|
import org.eclipse.jetty.util.component.Destroyable;
|
||||||
import org.eclipse.jetty.util.component.Graceful;
|
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");
|
__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 AttributesMap _attributes = new AttributesMap();
|
||||||
private final ThreadPool _threadPool;
|
private final ThreadPool _threadPool;
|
||||||
private final List<Connector> _connectors = new CopyOnWriteArrayList<>();
|
private final List<Connector> _connectors = new CopyOnWriteArrayList<>();
|
||||||
|
@ -102,7 +103,7 @@ public class Server extends HandlerWrapper implements Attributes
|
||||||
/** Convenience constructor
|
/** Convenience constructor
|
||||||
* Creates server and a {@link SelectChannelConnector} at the passed port.
|
* Creates server and a {@link SelectChannelConnector} at the passed port.
|
||||||
*/
|
*/
|
||||||
public Server(int port)
|
public Server(@Name("port")int port)
|
||||||
{
|
{
|
||||||
this((ThreadPool)null);
|
this((ThreadPool)null);
|
||||||
SelectChannelConnector connector=new SelectChannelConnector(this);
|
SelectChannelConnector connector=new SelectChannelConnector(this);
|
||||||
|
@ -114,7 +115,7 @@ public class Server extends HandlerWrapper implements Attributes
|
||||||
/** Convenience constructor
|
/** Convenience constructor
|
||||||
* Creates server and a {@link SelectChannelConnector} at the passed address.
|
* Creates server and a {@link SelectChannelConnector} at the passed address.
|
||||||
*/
|
*/
|
||||||
public Server(InetSocketAddress addr)
|
public Server(@Name("address")InetSocketAddress addr)
|
||||||
{
|
{
|
||||||
this((ThreadPool)null);
|
this((ThreadPool)null);
|
||||||
SelectChannelConnector connector=new SelectChannelConnector(this);
|
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();
|
_threadPool=pool!=null?pool:new QueuedThreadPool();
|
||||||
|
_container=container!=null?container:new Container();
|
||||||
addBean(_threadPool);
|
addBean(_threadPool);
|
||||||
setServer(this);
|
setServer(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
||||||
private Map<String, Object> _managedAttributes;
|
private Map<String, Object> _managedAttributes;
|
||||||
private String[] _protectedTargets;
|
private String[] _protectedTargets;
|
||||||
|
|
||||||
public enum Availability { AVAILABLE,SHUTDOWN,UNAVAILABLE};
|
public enum Availability { UNAVAILABLE,STARTING,AVAILABLE,SHUTDOWN,};
|
||||||
private volatile Availability _availability;
|
private volatile Availability _availability;
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
|
@ -666,7 +666,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
||||||
@Override
|
@Override
|
||||||
protected void doStart() throws Exception
|
protected void doStart() throws Exception
|
||||||
{
|
{
|
||||||
_availability = Availability.UNAVAILABLE;
|
_availability = Availability.STARTING;
|
||||||
|
|
||||||
if (_contextPath == null)
|
if (_contextPath == null)
|
||||||
throw new IllegalStateException("Null contextPath");
|
throw new IllegalStateException("Null contextPath");
|
||||||
|
@ -696,6 +696,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
||||||
startContext();
|
startContext();
|
||||||
|
|
||||||
_availability = Availability.AVAILABLE;
|
_availability = Availability.AVAILABLE;
|
||||||
|
LOG.info("started {}",this);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -756,7 +757,6 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
|
||||||
public void callContextInitialized (ServletContextListener l, ServletContextEvent e)
|
public void callContextInitialized (ServletContextListener l, ServletContextEvent e)
|
||||||
{
|
{
|
||||||
l.contextInitialized(e);
|
l.contextInitialized(e);
|
||||||
LOG.info("started {}",this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
|
|
|
@ -38,8 +38,8 @@ import org.eclipse.jetty.continuation.Continuation;
|
||||||
import org.eclipse.jetty.continuation.ContinuationListener;
|
import org.eclipse.jetty.continuation.ContinuationListener;
|
||||||
import org.eclipse.jetty.continuation.ContinuationSupport;
|
import org.eclipse.jetty.continuation.ContinuationSupport;
|
||||||
import org.eclipse.jetty.http.HttpMethod;
|
import org.eclipse.jetty.http.HttpMethod;
|
||||||
import org.eclipse.jetty.server.gzip.AbstractCompressedStream;
|
import org.eclipse.jetty.servlets.gzip.AbstractCompressedStream;
|
||||||
import org.eclipse.jetty.server.gzip.CompressedResponseWrapper;
|
import org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
import org.eclipse.jetty.util.log.Logger;
|
import org.eclipse.jetty.util.log.Logger;
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.eclipse.jetty.io.UncheckedPrintWriter;
|
import org.eclipse.jetty.io.UncheckedPrintWriter;
|
||||||
import org.eclipse.jetty.server.gzip.AbstractCompressedStream;
|
import org.eclipse.jetty.servlets.gzip.AbstractCompressedStream;
|
||||||
import org.eclipse.jetty.server.gzip.CompressedResponseWrapper;
|
import org.eclipse.jetty.servlets.gzip.CompressedResponseWrapper;
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
/** Includable GZip Filter.
|
/** Includable GZip Filter.
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
//
|
//
|
||||||
|
|
||||||
package org.eclipse.jetty.server.gzip;
|
package org.eclipse.jetty.servlets.gzip;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
|
@ -16,7 +16,7 @@
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
//
|
//
|
||||||
|
|
||||||
package org.eclipse.jetty.server.gzip;
|
package org.eclipse.jetty.servlets.gzip;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
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)
|
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
|
@Override
|
||||||
public void setBufferSize(int bufferSize)
|
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)
|
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
|
@Override
|
||||||
public void setContentType(String ct)
|
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
|
@Override
|
||||||
public void setStatus(int sc, String sm)
|
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
|
@Override
|
||||||
public void setStatus(int sc)
|
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
|
@Override
|
||||||
public void setContentLength(int length)
|
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
|
@Override
|
||||||
public void addHeader(String name, String value)
|
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
|
@Override
|
||||||
public void flushBuffer() throws IOException
|
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
|
@Override
|
||||||
public void reset()
|
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
|
@Override
|
||||||
public void resetBuffer()
|
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
|
@Override
|
||||||
public void sendError(int sc, String msg) throws IOException
|
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
|
@Override
|
||||||
public void sendError(int sc) throws IOException
|
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
|
@Override
|
||||||
public void sendRedirect(String location) throws IOException
|
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()
|
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
|
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
|
@Override
|
||||||
public void setHeader(String name, String value)
|
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
|
@Override
|
||||||
public ServletOutputStream getOutputStream() throws IOException
|
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
|
@Override
|
||||||
public PrintWriter getWriter() throws IOException
|
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
|
@Override
|
||||||
public void setIntHeader(String name, int value)
|
public void setIntHeader(String name, int value)
|
|
@ -16,7 +16,7 @@
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
//
|
//
|
||||||
|
|
||||||
package org.eclipse.jetty.server.handler;
|
package org.eclipse.jetty.servlets.gzip;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
@ -38,8 +38,9 @@ import org.eclipse.jetty.continuation.ContinuationListener;
|
||||||
import org.eclipse.jetty.continuation.ContinuationSupport;
|
import org.eclipse.jetty.continuation.ContinuationSupport;
|
||||||
import org.eclipse.jetty.http.HttpMethod;
|
import org.eclipse.jetty.http.HttpMethod;
|
||||||
import org.eclipse.jetty.server.Request;
|
import org.eclipse.jetty.server.Request;
|
||||||
import org.eclipse.jetty.server.gzip.AbstractCompressedStream;
|
import org.eclipse.jetty.servlets.gzip.AbstractCompressedStream;
|
||||||
import org.eclipse.jetty.server.gzip.CompressedResponseWrapper;
|
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.Log;
|
||||||
import org.eclipse.jetty.util.log.Logger;
|
import org.eclipse.jetty.util.log.Logger;
|
||||||
|
|
|
@ -24,8 +24,8 @@ import java.util.List;
|
||||||
import javax.servlet.Servlet;
|
import javax.servlet.Servlet;
|
||||||
|
|
||||||
import org.eclipse.jetty.http.HttpStatus;
|
import org.eclipse.jetty.http.HttpStatus;
|
||||||
import org.eclipse.jetty.server.gzip.CompressedResponseWrapper;
|
|
||||||
import org.eclipse.jetty.servlet.FilterHolder;
|
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.GzipTester;
|
||||||
import org.eclipse.jetty.servlets.gzip.TestServletLengthStreamTypeWrite;
|
import org.eclipse.jetty.servlets.gzip.TestServletLengthStreamTypeWrite;
|
||||||
import org.eclipse.jetty.servlets.gzip.TestServletLengthTypeStreamWrite;
|
import org.eclipse.jetty.servlets.gzip.TestServletLengthTypeStreamWrite;
|
||||||
|
|
|
@ -27,9 +27,9 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.eclipse.jetty.http.HttpStatus;
|
import org.eclipse.jetty.http.HttpStatus;
|
||||||
import org.eclipse.jetty.server.gzip.CompressedResponseWrapper;
|
|
||||||
import org.eclipse.jetty.servlet.DefaultServlet;
|
import org.eclipse.jetty.servlet.DefaultServlet;
|
||||||
import org.eclipse.jetty.servlet.FilterHolder;
|
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.GzipTester;
|
||||||
import org.eclipse.jetty.toolchain.test.TestingDir;
|
import org.eclipse.jetty.toolchain.test.TestingDir;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
|
|
|
@ -142,8 +142,8 @@ public class Main
|
||||||
{
|
{
|
||||||
List<String> ini_args=new ArrayList<String>();
|
List<String> ini_args=new ArrayList<String>();
|
||||||
File start_ini = new File(_jettyHome,"start.ini");
|
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");
|
File start_d = new File(_jettyHome,"start.d");
|
||||||
if (start_d.isDirectory())
|
if (start_d.isDirectory())
|
||||||
|
@ -156,9 +156,21 @@ public class Main
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Arrays.sort(inis);
|
Arrays.sort(inis);
|
||||||
|
|
||||||
for (File i : 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));
|
ini_args.addAll(loadStartIni(i));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!start_ini_processed )
|
||||||
|
ini_args.addAll(loadStartIni(start_ini));
|
||||||
|
|
||||||
return ini_args;
|
return ini_args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,7 +404,7 @@ public class Main
|
||||||
}
|
}
|
||||||
else if (info.equals("@STARTINI"))
|
else if (info.equals("@STARTINI"))
|
||||||
{
|
{
|
||||||
List<String> ini = loadStartIni(new File(_jettyHome,"start.ini"));
|
List<String> ini = parseStartIniFiles();
|
||||||
if (ini != null && ini.size() > 0)
|
if (ini != null && ini.size() > 0)
|
||||||
{
|
{
|
||||||
for (String a : ini)
|
for (String a : ini)
|
||||||
|
|
|
@ -146,7 +146,8 @@ $(jetty.home)/lib/jetty-client-$(version).jar
|
||||||
$(jetty.home)/lib/jetty-http-$(version).jar ! available org.eclipse.jetty.http.HttpParser
|
$(jetty.home)/lib/jetty-http-$(version).jar ! available org.eclipse.jetty.http.HttpParser
|
||||||
|
|
||||||
[All,websocket]
|
[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]
|
[All,overlay,overlays]
|
||||||
$(jetty.home)/lib/jetty-overlay-deployer-$(version).jar ! available org.eclipse.jetty.overlay.OverlayedAppProvider
|
$(jetty.home)/lib/jetty-overlay-deployer-$(version).jar ! available org.eclipse.jetty.overlay.OverlayedAppProvider
|
||||||
|
|
|
@ -120,9 +120,12 @@ Defaults:
|
||||||
which are used if no command line arguments are provided and override
|
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
|
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
|
exists, then multiple *.ini files will be read from that directory in
|
||||||
alphabetical order. If --ini options are provided on the command line,
|
alphabetical order. The contents of start.ini are processed after any
|
||||||
then start.ini and start.d will NOT be read.
|
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@
|
@STARTINI@
|
||||||
|
|
|
@ -22,7 +22,9 @@
|
||||||
</Arg>
|
</Arg>
|
||||||
</New>
|
</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="setErr"><Arg><Ref id="ServerLog"/></Arg></Call>
|
||||||
<Call class="java.lang.System" name="setOut"><Arg><Ref id="ServerLog"/></Arg></Call>
|
<Call class="java.lang.System" name="setOut"><Arg><Ref id="ServerLog"/></Arg></Call>
|
||||||
|
|
||||||
|
|
|
@ -107,8 +107,7 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
|
||||||
"org.eclipse.jetty.continuation.", // webapp cannot change continuation classes
|
"org.eclipse.jetty.continuation.", // webapp cannot change continuation classes
|
||||||
"org.eclipse.jetty.jndi.", // webapp cannot change naming classes
|
"org.eclipse.jetty.jndi.", // webapp cannot change naming classes
|
||||||
"org.eclipse.jetty.plus.jaas.", // webapp cannot change jaas 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.", // WebSocket is a jetty extension
|
||||||
"org.eclipse.jetty.websocket.WebSocketFactory", // WebSocket is a jetty extension
|
|
||||||
"org.eclipse.jetty.servlet.DefaultServlet" // webapp cannot change default servlets
|
"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.continuation.", // don't hide continuation classes
|
||||||
"-org.eclipse.jetty.jndi.", // don't hide naming classes
|
"-org.eclipse.jetty.jndi.", // don't hide naming classes
|
||||||
"-org.eclipse.jetty.plus.jaas.", // don't hide jaas 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.", // WebSocket is a jetty extension
|
||||||
"-org.eclipse.jetty.websocket.WebSocketFactory", // WebSocket is a jetty extension
|
|
||||||
"-org.eclipse.jetty.servlet.DefaultServlet", // don't hide default servlet
|
"-org.eclipse.jetty.servlet.DefaultServlet", // don't hide default servlet
|
||||||
"-org.eclipse.jetty.servlet.listener.", // don't hide useful listeners
|
"-org.eclipse.jetty.servlet.listener.", // don't hide useful listeners
|
||||||
"org.eclipse.jetty." // hide other jetty classes
|
"org.eclipse.jetty." // hide other jetty classes
|
||||||
|
@ -855,13 +853,18 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
|
|
|
@ -346,6 +346,22 @@ public class XmlConfiguration
|
||||||
if (id != null)
|
if (id != null)
|
||||||
_idMap.put(id,obj);
|
_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++)
|
for (; i < cfg.size(); i++)
|
||||||
{
|
{
|
||||||
Object o = cfg.get(i);
|
Object o = cfg.get(i);
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.eclipse.jetty.util.annotation.Name;
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
|
|
||||||
@Ignore
|
@Ignore
|
||||||
|
@ -33,6 +34,7 @@ public class TestConfiguration extends HashMap<String,Object>
|
||||||
{
|
{
|
||||||
public static int VALUE=77;
|
public static int VALUE=77;
|
||||||
|
|
||||||
|
public final String name;
|
||||||
public TestConfiguration nested;
|
public TestConfiguration nested;
|
||||||
public Object testObject;
|
public Object testObject;
|
||||||
public int testInt;
|
public int testInt;
|
||||||
|
@ -50,6 +52,18 @@ public class TestConfiguration extends HashMap<String,Object>
|
||||||
private ConstructorArgTestClass constructorArgTestClass;
|
private ConstructorArgTestClass constructorArgTestClass;
|
||||||
public Map map;
|
public Map map;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public TestConfiguration()
|
||||||
|
{
|
||||||
|
this("");
|
||||||
|
}
|
||||||
|
|
||||||
|
public TestConfiguration(@Name("name") String n)
|
||||||
|
{
|
||||||
|
name=n;
|
||||||
|
}
|
||||||
|
|
||||||
public void setTest(Object value)
|
public void setTest(Object value)
|
||||||
{
|
{
|
||||||
testObject=value;
|
testObject=value;
|
||||||
|
@ -73,7 +87,7 @@ public class TestConfiguration extends HashMap<String,Object>
|
||||||
|
|
||||||
public TestConfiguration call(Boolean b)
|
public TestConfiguration call(Boolean b)
|
||||||
{
|
{
|
||||||
nested=new TestConfiguration();
|
nested=new TestConfiguration("called-"+name);
|
||||||
nested.put("Arg",b);
|
nested.put("Arg",b);
|
||||||
return nested;
|
return nested;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class XmlConfigurationTest
|
||||||
|
|
||||||
URL url = XmlConfigurationTest.class.getClassLoader().getResource(_configure);
|
URL url = XmlConfigurationTest.class.getClassLoader().getResource(_configure);
|
||||||
XmlConfiguration configuration = new XmlConfiguration(url);
|
XmlConfiguration configuration = new XmlConfiguration(url);
|
||||||
TestConfiguration tc = new TestConfiguration();
|
TestConfiguration tc = new TestConfiguration("tc");
|
||||||
configuration.getProperties().putAll(properties);
|
configuration.getProperties().putAll(properties);
|
||||||
configuration.configure(tc);
|
configuration.configure(tc);
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
<!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">
|
<Configure class="org.eclipse.jetty.xml.TestConfiguration">
|
||||||
|
<Arg name="name">name</Arg>
|
||||||
|
|
||||||
<Set name="Test">SetValue</Set>
|
<Set name="Test">SetValue</Set>
|
||||||
<Set name="Test" type="int"><Property name="does.not.exist" default="2"/></Set>
|
<Set name="Test" type="int"><Property name="does.not.exist" default="2"/></Set>
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -378,8 +378,11 @@
|
||||||
<module>jetty-annotations</module>
|
<module>jetty-annotations</module>
|
||||||
<module>jetty-jndi</module>
|
<module>jetty-jndi</module>
|
||||||
<module>jetty-jsp</module>
|
<module>jetty-jsp</module>
|
||||||
|
<module>jetty-distribution</module>
|
||||||
|
|
||||||
<module>jetty-spring</module>
|
<module>jetty-spring</module>
|
||||||
|
|
||||||
|
|
||||||
<!-- modules that need fixed and added back, or simply dropped and not maintained
|
<!-- modules that need fixed and added back, or simply dropped and not maintained
|
||||||
|
|
||||||
<module>jetty-runner</module>
|
<module>jetty-runner</module>
|
||||||
|
@ -533,7 +536,6 @@
|
||||||
<!--
|
<!--
|
||||||
<module>jetty-aggregate</module>
|
<module>jetty-aggregate</module>
|
||||||
-->
|
-->
|
||||||
<module>jetty-distribution</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
|
|
Loading…
Reference in New Issue