imports and formatting
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@269 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
2b6057b3ea
commit
515c800bf9
|
@ -16,11 +16,7 @@ package org.eclipse.jetty.annotations;
|
||||||
import java.util.EventListener;
|
import java.util.EventListener;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.jetty.plus.annotation.InjectionCollection;
|
|
||||||
import org.eclipse.jetty.plus.annotation.LifeCycleCallbackCollection;
|
|
||||||
import org.eclipse.jetty.plus.annotation.RunAsCollection;
|
|
||||||
import org.eclipse.jetty.plus.servlet.ServletHandler;
|
import org.eclipse.jetty.plus.servlet.ServletHandler;
|
||||||
import org.eclipse.jetty.security.SecurityHandler;
|
|
||||||
import org.eclipse.jetty.servlet.FilterHolder;
|
import org.eclipse.jetty.servlet.FilterHolder;
|
||||||
import org.eclipse.jetty.servlet.FilterMapping;
|
import org.eclipse.jetty.servlet.FilterMapping;
|
||||||
import org.eclipse.jetty.servlet.ServletHolder;
|
import org.eclipse.jetty.servlet.ServletHolder;
|
||||||
|
|
|
@ -16,9 +16,7 @@ package org.eclipse.jetty.annotations;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.annotation.PreDestroy;
|
import javax.annotation.PreDestroy;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package org.eclipse.jetty.annotations;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class ContinuationFilter implements Filter
|
||||||
_partial=param!=null&&Boolean.parseBoolean(param) || (ContinuationSupport.__jetty6&&!jetty);
|
_partial=param!=null&&Boolean.parseBoolean(param) || (ContinuationSupport.__jetty6&&!jetty);
|
||||||
|
|
||||||
param=filterConfig.getInitParameter("faux");
|
param=filterConfig.getInitParameter("faux");
|
||||||
_faux=(param!=null&&Boolean.parseBoolean(param)) || !(jetty || _partial || ContinuationSupport.__servlet3);
|
_faux=(param!=null&&Boolean.parseBoolean(param)) || !(jetty || _partial || _context.getMajorVersion()>=3);
|
||||||
|
|
||||||
if (_debug)
|
if (_debug)
|
||||||
_context.log("ContinuationFilter "+
|
_context.log("ContinuationFilter "+
|
||||||
|
|
|
@ -34,7 +34,6 @@ import org.eclipse.jetty.plus.jaas.callback.ObjectCallback;
|
||||||
import org.eclipse.jetty.security.DefaultIdentityService;
|
import org.eclipse.jetty.security.DefaultIdentityService;
|
||||||
import org.eclipse.jetty.security.IdentityService;
|
import org.eclipse.jetty.security.IdentityService;
|
||||||
import org.eclipse.jetty.security.LoginService;
|
import org.eclipse.jetty.security.LoginService;
|
||||||
import org.eclipse.jetty.security.ServerAuthException;
|
|
||||||
import org.eclipse.jetty.server.UserIdentity;
|
import org.eclipse.jetty.server.UserIdentity;
|
||||||
import org.eclipse.jetty.util.component.AbstractLifeCycle;
|
import org.eclipse.jetty.util.component.AbstractLifeCycle;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
|
|
|
@ -33,7 +33,6 @@ import org.eclipse.jetty.util.TypeUtil;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
import org.eclipse.jetty.webapp.Configuration;
|
import org.eclipse.jetty.webapp.Configuration;
|
||||||
import org.eclipse.jetty.webapp.WebAppContext;
|
import org.eclipse.jetty.webapp.WebAppContext;
|
||||||
import org.eclipse.jetty.webapp.WebXmlConfiguration;
|
|
||||||
import org.eclipse.jetty.webapp.WebXmlProcessor;
|
import org.eclipse.jetty.webapp.WebXmlProcessor;
|
||||||
import org.eclipse.jetty.xml.XmlParser;
|
import org.eclipse.jetty.xml.XmlParser;
|
||||||
|
|
||||||
|
|
|
@ -545,10 +545,6 @@ public class HttpConnection implements Connection
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (RetryRequest r)
|
|
||||||
{
|
|
||||||
Log.ignore(r);
|
|
||||||
}
|
|
||||||
catch (EofException e)
|
catch (EofException e)
|
||||||
{
|
{
|
||||||
Log.ignore(e);
|
Log.ignore(e);
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
// ========================================================================
|
|
||||||
// Copyright (c) 2004-2009 Mort Bay Consulting Pty. Ltd.
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
// All rights reserved. This program and the accompanying materials
|
|
||||||
// are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
// and Apache License v2.0 which accompanies this distribution.
|
|
||||||
// The Eclipse Public License is available at
|
|
||||||
// http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
// The Apache License v2.0 is available at
|
|
||||||
// http://www.opensource.org/licenses/apache2.0.php
|
|
||||||
// You may elect to redistribute this code under either of these licenses.
|
|
||||||
// ========================================================================
|
|
||||||
|
|
||||||
package org.eclipse.jetty.server;
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
|
||||||
/** Retry Request
|
|
||||||
* This is thrown by a non-blocking {@link Continuation} such as
|
|
||||||
* {@link SuspendableSelectChannelEndPoint}. While it
|
|
||||||
* extends ThreadDeath, it does not actually stop the thread calling it.
|
|
||||||
* It extends ThreadDeath so as to be an Error that will not be caught
|
|
||||||
* by most frameworks.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class RetryRequest extends ThreadDeath
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -27,7 +27,6 @@ import org.eclipse.jetty.http.HttpCookie;
|
||||||
import org.eclipse.jetty.server.DispatcherType;
|
import org.eclipse.jetty.server.DispatcherType;
|
||||||
import org.eclipse.jetty.server.HttpConnection;
|
import org.eclipse.jetty.server.HttpConnection;
|
||||||
import org.eclipse.jetty.server.Request;
|
import org.eclipse.jetty.server.Request;
|
||||||
import org.eclipse.jetty.server.RetryRequest;
|
|
||||||
import org.eclipse.jetty.server.Server;
|
import org.eclipse.jetty.server.Server;
|
||||||
import org.eclipse.jetty.server.SessionManager;
|
import org.eclipse.jetty.server.SessionManager;
|
||||||
import org.eclipse.jetty.server.handler.HandlerWrapper;
|
import org.eclipse.jetty.server.handler.HandlerWrapper;
|
||||||
|
@ -180,13 +179,6 @@ public class SessionHandler extends HandlerWrapper
|
||||||
|
|
||||||
getHandler().handle(target, baseRequest, request, response);
|
getHandler().handle(target, baseRequest, request, response);
|
||||||
}
|
}
|
||||||
catch (RetryRequest r)
|
|
||||||
{
|
|
||||||
HttpSession session=baseRequest.getSession(false);
|
|
||||||
if (session!=null && session.isNew())
|
|
||||||
baseRequest.saveNewSession(_sessionManager,session);
|
|
||||||
throw r;
|
|
||||||
}
|
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
HttpSession session=request.getSession(false);
|
HttpSession session=request.getSession(false);
|
||||||
|
|
|
@ -28,7 +28,6 @@ import javax.servlet.UnavailableException;
|
||||||
import javax.servlet.http.HttpServlet;
|
import javax.servlet.http.HttpServlet;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpServletResponseWrapper;
|
|
||||||
|
|
||||||
import org.eclipse.jetty.http.HttpContent;
|
import org.eclipse.jetty.http.HttpContent;
|
||||||
import org.eclipse.jetty.http.HttpFields;
|
import org.eclipse.jetty.http.HttpFields;
|
||||||
|
|
|
@ -19,7 +19,6 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.RequestDispatcher;
|
|
||||||
import javax.servlet.ServletContext;
|
import javax.servlet.ServletContext;
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
|
@ -13,12 +13,9 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.servlet;
|
package org.eclipse.jetty.servlet;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
|
||||||
|
|
||||||
import javax.servlet.Filter;
|
import javax.servlet.Filter;
|
||||||
import javax.servlet.FilterConfig;
|
import javax.servlet.FilterConfig;
|
||||||
|
|
||||||
import org.eclipse.jetty.server.DispatcherType;
|
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
|
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
|
|
|
@ -16,7 +16,6 @@ package org.eclipse.jetty.servlet;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
|
|
||||||
import org.eclipse.jetty.http.PathMap;
|
import org.eclipse.jetty.http.PathMap;
|
||||||
import org.eclipse.jetty.server.DispatcherType;
|
import org.eclipse.jetty.server.DispatcherType;
|
||||||
import org.eclipse.jetty.server.Handler;
|
import org.eclipse.jetty.server.Handler;
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.servlet;
|
package org.eclipse.jetty.servlet;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
|
@ -29,8 +29,6 @@ import javax.servlet.Servlet;
|
||||||
import javax.servlet.ServletContext;
|
import javax.servlet.ServletContext;
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import javax.servlet.ServletRequestEvent;
|
|
||||||
import javax.servlet.ServletRequestListener;
|
|
||||||
import javax.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import javax.servlet.UnavailableException;
|
import javax.servlet.UnavailableException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
@ -43,14 +41,10 @@ import org.eclipse.jetty.security.IdentityService;
|
||||||
import org.eclipse.jetty.security.SecurityHandler;
|
import org.eclipse.jetty.security.SecurityHandler;
|
||||||
import org.eclipse.jetty.server.Dispatcher;
|
import org.eclipse.jetty.server.Dispatcher;
|
||||||
import org.eclipse.jetty.server.DispatcherType;
|
import org.eclipse.jetty.server.DispatcherType;
|
||||||
import org.eclipse.jetty.server.Handler;
|
|
||||||
import org.eclipse.jetty.server.HandlerContainer;
|
|
||||||
import org.eclipse.jetty.server.HttpConnection;
|
import org.eclipse.jetty.server.HttpConnection;
|
||||||
import org.eclipse.jetty.server.Request;
|
import org.eclipse.jetty.server.Request;
|
||||||
import org.eclipse.jetty.server.RetryRequest;
|
|
||||||
import org.eclipse.jetty.server.Server;
|
import org.eclipse.jetty.server.Server;
|
||||||
import org.eclipse.jetty.server.UserIdentity;
|
import org.eclipse.jetty.server.UserIdentity;
|
||||||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
|
||||||
import org.eclipse.jetty.server.handler.ContextHandler;
|
import org.eclipse.jetty.server.handler.ContextHandler;
|
||||||
import org.eclipse.jetty.server.handler.ScopedHandler;
|
import org.eclipse.jetty.server.handler.ScopedHandler;
|
||||||
import org.eclipse.jetty.util.LazyList;
|
import org.eclipse.jetty.util.LazyList;
|
||||||
|
@ -59,7 +53,6 @@ import org.eclipse.jetty.util.MultiMap;
|
||||||
import org.eclipse.jetty.util.URIUtil;
|
import org.eclipse.jetty.util.URIUtil;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
/** Servlet HttpHandler.
|
/** Servlet HttpHandler.
|
||||||
* This handler maps requests to servlets that implement the
|
* This handler maps requests to servlets that implement the
|
||||||
|
@ -399,9 +392,8 @@ public class ServletHandler extends ScopedHandler
|
||||||
// find the servlet
|
// find the servlet
|
||||||
if (target.startsWith("/"))
|
if (target.startsWith("/"))
|
||||||
{
|
{
|
||||||
if (servlet_holder!=null && _filterMappings!=null && _filterMappings.length>0)
|
if (servlet_holder!=null && _filterMappings!=null && _filterMappings.length>0)
|
||||||
chain=getFilterChain(baseRequest, target, servlet_holder);
|
chain=getFilterChain(baseRequest, target, servlet_holder);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -433,10 +425,6 @@ public class ServletHandler extends ScopedHandler
|
||||||
servlet_holder.handle(baseRequest,request,response);
|
servlet_holder.handle(baseRequest,request,response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(RetryRequest e)
|
|
||||||
{
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
catch(EofException e)
|
catch(EofException e)
|
||||||
{
|
{
|
||||||
throw e;
|
throw e;
|
||||||
|
@ -468,12 +456,7 @@ public class ServletHandler extends ScopedHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle or log exception
|
// handle or log exception
|
||||||
if (th instanceof RetryRequest)
|
if (th instanceof HttpException)
|
||||||
{
|
|
||||||
baseRequest.setHandled(false);
|
|
||||||
throw (RetryRequest)th;
|
|
||||||
}
|
|
||||||
else if (th instanceof HttpException)
|
|
||||||
{
|
{
|
||||||
throw (HttpException)th;
|
throw (HttpException)th;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.eclipse.jetty.servlet;
|
package org.eclipse.jetty.servlet;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
import org.eclipse.jetty.server.Server;
|
|
||||||
import org.eclipse.jetty.server.Request;
|
import org.eclipse.jetty.server.Request;
|
||||||
|
import org.eclipse.jetty.server.Server;
|
||||||
import org.eclipse.jetty.server.SessionIdManager;
|
import org.eclipse.jetty.server.SessionIdManager;
|
||||||
import org.eclipse.jetty.server.SessionManager;
|
import org.eclipse.jetty.server.SessionManager;
|
||||||
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
|
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
|
||||||
|
|
Loading…
Reference in New Issue