JBossWeb SVN: r1458 - in trunk/java/org: apache/catalina/authenticator and 5 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-04-30 19:47:43 -0400 (Fri, 30 Apr 2010)
New Revision: 1458
Modified:
trunk/java/org/apache/catalina/Globals.java
trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java
trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
trunk/java/org/apache/catalina/connector/Request.java
trunk/java/org/apache/catalina/core/ApplicationDispatcher.java
trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
trunk/java/org/apache/catalina/core/ApplicationRequest.java
trunk/java/org/apache/catalina/core/StandardContextValve.java
trunk/java/org/apache/catalina/core/StandardHostValve.java
trunk/java/org/apache/catalina/core/StandardWrapperValve.java
trunk/java/org/apache/catalina/servlets/CGIServlet.java
trunk/java/org/apache/catalina/servlets/DefaultServlet.java
trunk/java/org/apache/catalina/servlets/WebdavServlet.java
trunk/java/org/apache/catalina/valves/ErrorReportValve.java
trunk/java/org/jboss/web/php/Handler.java
trunk/java/org/jboss/web/php/ScriptEnvironment.java
Log:
- Remove constants that are now useless.
Modified: trunk/java/org/apache/catalina/Globals.java
===================================================================
--- trunk/java/org/apache/catalina/Globals.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/Globals.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -53,13 +53,6 @@
/**
- * The servlet context attribute under which we store the class loader
- * used for loading servlets (as an object of type java.lang.ClassLoader).
- */
- public static final String CLASS_LOADER_ATTR =
- "org.apache.catalina.classloader";
-
- /**
* Request dispatcher state.
*/
public static final String DISPATCHER_TYPE_ATTR =
@@ -80,56 +73,6 @@
/**
- * The servlet context attribute under which we store the class path
- * for our application class loader (as an object of type String),
- * delimited with the appropriate path delimiter for this platform.
- */
- public static final String CLASS_PATH_ATTR =
- "org.apache.catalina.jsp_classpath";
-
-
- /**
- * The request attribute under which we forward a Java exception
- * (as an object of type Throwable) to an error page.
- */
- public static final String EXCEPTION_ATTR =
- "javax.servlet.error.exception";
-
-
- /**
- * The request attribute under which we forward the request URI
- * (as an object of type String) of the page on which an error occurred.
- */
- public static final String EXCEPTION_PAGE_ATTR =
- "javax.servlet.error.request_uri";
-
-
- /**
- * The request attribute under which we forward a Java exception type
- * (as an object of type Class) to an error page.
- */
- public static final String EXCEPTION_TYPE_ATTR =
- "javax.servlet.error.exception_type";
-
-
- /**
- * The request attribute under which we forward an HTTP status message
- * (as an object of type STring) to an error page.
- */
- public static final String ERROR_MESSAGE_ATTR =
- "javax.servlet.error.message";
-
-
- /**
- * The request attribute under which the Invoker servlet will store
- * the invoking servlet path, if it was used to execute a servlet
- * indirectly instead of through a servlet mapping.
- */
- public static final String INVOKED_ATTR =
- "org.apache.catalina.INVOKED";
-
-
- /**
* The request attribute under which we expose the value of the
* <code><jsp-file></code> value associated with this servlet,
* if any.
@@ -188,14 +131,6 @@
/**
- * The servlet context attribute under which the MBeanServer will be stored
- * for privileged contexts (if enabled).
- */
- public static final String MBEAN_SERVER_ATTR =
- "org.apache.catalina.MBeanServer";
-
-
- /**
* The request attribute under which we store the servlet name on a
* named dispatcher request.
*/
@@ -204,94 +139,6 @@
/**
- * The request attribute under which the request URI of the included
- * servlet is stored on an included dispatcher request.
- */
- public static final String INCLUDE_REQUEST_URI_ATTR =
- "javax.servlet.include.request_uri";
-
-
- /**
- * The request attribute under which the context path of the included
- * servlet is stored on an included dispatcher request.
- */
- public static final String INCLUDE_CONTEXT_PATH_ATTR =
- "javax.servlet.include.context_path";
-
-
- /**
- * The request attribute under which the path info of the included
- * servlet is stored on an included dispatcher request.
- */
- public static final String INCLUDE_PATH_INFO_ATTR =
- "javax.servlet.include.path_info";
-
-
- /**
- * The request attribute under which the servlet path of the included
- * servlet is stored on an included dispatcher request.
- */
- public static final String INCLUDE_SERVLET_PATH_ATTR =
- "javax.servlet.include.servlet_path";
-
-
- /**
- * The request attribute under which the query string of the included
- * servlet is stored on an included dispatcher request.
- */
- public static final String INCLUDE_QUERY_STRING_ATTR =
- "javax.servlet.include.query_string";
-
-
- /**
- * The request attribute under which the original request URI is stored
- * on an forwarded dispatcher request.
- */
- public static final String FORWARD_REQUEST_URI_ATTR =
- "javax.servlet.forward.request_uri";
-
-
- /**
- * The request attribute under which the original context path is stored
- * on an forwarded dispatcher request.
- */
- public static final String FORWARD_CONTEXT_PATH_ATTR =
- "javax.servlet.forward.context_path";
-
-
- /**
- * The request attribute under which the original path info is stored
- * on an forwarded dispatcher request.
- */
- public static final String FORWARD_PATH_INFO_ATTR =
- "javax.servlet.forward.path_info";
-
-
- /**
- * The request attribute under which the original servlet path is stored
- * on an forwarded dispatcher request.
- */
- public static final String FORWARD_SERVLET_PATH_ATTR =
- "javax.servlet.forward.servlet_path";
-
-
- /**
- * The request attribute under which the original query string is stored
- * on an forwarded dispatcher request.
- */
- public static final String FORWARD_QUERY_STRING_ATTR =
- "javax.servlet.forward.query_string";
-
-
- /**
- * The request attribute under which we forward a servlet name to
- * an error page.
- */
- public static final String SERVLET_NAME_ATTR =
- "javax.servlet.error.servlet_name";
-
-
- /**
* The name of the cookie used to pass the session identifier back
* and forth with the client.
*/
@@ -319,14 +166,6 @@
/**
- * The request attribute under which we forward an HTTP status code
- * (as an object of type Integer) to an error page.
- */
- public static final String STATUS_CODE_ATTR =
- "javax.servlet.error.status_code";
-
-
- /**
* The subject under which the AccessControlContext is running.
*/
public static final String SUBJECT_ATTR =
Modified: trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java
===================================================================
--- trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -31,7 +31,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.catalina.Globals;
import org.apache.catalina.Realm;
import org.apache.catalina.Session;
import org.apache.catalina.connector.Request;
@@ -319,7 +318,7 @@
} catch (Throwable t) {
String msg = sm.getString("formAuthenticator.forwardLoginFail");
log.warn(msg, t);
- request.setAttribute(Globals.EXCEPTION_ATTR, t);
+ request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
msg);
}
@@ -346,7 +345,7 @@
} catch (Throwable t) {
String msg = sm.getString("formAuthenticator.forwardErrorFail");
log.warn(msg, t);
- request.setAttribute(Globals.EXCEPTION_ATTR, t);
+ request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
msg);
}
Modified: trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -50,6 +50,7 @@
import javax.servlet.AsyncEvent;
import javax.servlet.AsyncListener;
+import javax.servlet.RequestDispatcher;
import javax.servlet.SessionTrackingMode;
import org.apache.catalina.Context;
@@ -270,7 +271,7 @@
// Calling the container
connector.getContainer().getPipeline().getFirst().event(request, response, request.getEvent());
- if (!error && (request.getAttribute(Globals.EXCEPTION_ATTR) != null)) {
+ if (!error && (request.getAttribute(RequestDispatcher.ERROR_EXCEPTION) != null)) {
// An unexpected exception occurred while processing the event, so
// error should be called
request.getEvent().setType(HttpEvent.EventType.ERROR);
Modified: trunk/java/org/apache/catalina/connector/Request.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Request.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/connector/Request.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -1440,7 +1440,7 @@
return (context.getServletContext().getRequestDispatcher(path));
// Convert a request-relative path to a context-relative one
- String servletPath = (String) getAttribute(Globals.INCLUDE_SERVLET_PATH_ATTR);
+ String servletPath = (String) getAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH);
if (servletPath == null)
servletPath = getServletPath();
@@ -1548,7 +1548,7 @@
} catch (Throwable t) {
context.getLogger().error(sm.getString("coyoteRequest.attributeEvent"), t);
// Error valve will pick this execption up and display it to user
- attributes.put( Globals.EXCEPTION_ATTR, t );
+ attributes.put(RequestDispatcher.ERROR_EXCEPTION, t);
}
}
}
@@ -1632,7 +1632,7 @@
} catch (Throwable t) {
context.getLogger().error(sm.getString("coyoteRequest.attributeEvent"), t);
// Error valve will pick this execption up and display it to user
- attributes.put( Globals.EXCEPTION_ATTR, t );
+ attributes.put(RequestDispatcher.ERROR_EXCEPTION, t);
}
}
}
Modified: trunk/java/org/apache/catalina/core/ApplicationDispatcher.java
===================================================================
--- trunk/java/org/apache/catalina/core/ApplicationDispatcher.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/core/ApplicationDispatcher.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -454,16 +454,16 @@
(ApplicationHttpRequest) wrapRequest(state);
String contextPath = context.getPath();
HttpServletRequest hrequest = state.hrequest;
- if (hrequest.getAttribute(Globals.FORWARD_REQUEST_URI_ATTR) == null) {
- wrequest.setAttribute(Globals.FORWARD_REQUEST_URI_ATTR,
+ if (hrequest.getAttribute(RequestDispatcher.FORWARD_REQUEST_URI) == null) {
+ wrequest.setAttribute(RequestDispatcher.FORWARD_REQUEST_URI,
hrequest.getRequestURI());
- wrequest.setAttribute(Globals.FORWARD_CONTEXT_PATH_ATTR,
+ wrequest.setAttribute(RequestDispatcher.FORWARD_CONTEXT_PATH,
hrequest.getContextPath());
- wrequest.setAttribute(Globals.FORWARD_SERVLET_PATH_ATTR,
+ wrequest.setAttribute(RequestDispatcher.FORWARD_SERVLET_PATH,
hrequest.getServletPath());
- wrequest.setAttribute(Globals.FORWARD_PATH_INFO_ATTR,
+ wrequest.setAttribute(RequestDispatcher.FORWARD_PATH_INFO,
hrequest.getPathInfo());
- wrequest.setAttribute(Globals.FORWARD_QUERY_STRING_ATTR,
+ wrequest.setAttribute(RequestDispatcher.FORWARD_QUERY_STRING,
hrequest.getQueryString());
}
@@ -614,19 +614,19 @@
(ApplicationHttpRequest) wrapRequest(state);
String contextPath = context.getPath();
if (requestURI != null)
- wrequest.setAttribute(Globals.INCLUDE_REQUEST_URI_ATTR,
+ wrequest.setAttribute(RequestDispatcher.INCLUDE_REQUEST_URI,
requestURI);
if (contextPath != null)
- wrequest.setAttribute(Globals.INCLUDE_CONTEXT_PATH_ATTR,
+ wrequest.setAttribute(RequestDispatcher.INCLUDE_CONTEXT_PATH,
contextPath);
if (servletPath != null)
- wrequest.setAttribute(Globals.INCLUDE_SERVLET_PATH_ATTR,
+ wrequest.setAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH,
servletPath);
if (pathInfo != null)
- wrequest.setAttribute(Globals.INCLUDE_PATH_INFO_ATTR,
+ wrequest.setAttribute(RequestDispatcher.INCLUDE_PATH_INFO,
pathInfo);
if (queryString != null) {
- wrequest.setAttribute(Globals.INCLUDE_QUERY_STRING_ATTR,
+ wrequest.setAttribute(RequestDispatcher.INCLUDE_QUERY_STRING,
queryString);
wrequest.setQueryParams(queryString);
}
@@ -932,7 +932,7 @@
HttpServletRequest houterRequest =
(HttpServletRequest) state.outerRequest;
Object contextPath = houterRequest.getAttribute
- (Globals.INCLUDE_CONTEXT_PATH_ATTR);
+ (RequestDispatcher.INCLUDE_CONTEXT_PATH);
if (contextPath == null) {
// Forward
contextPath = houterRequest.getContextPath();
Modified: trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java
===================================================================
--- trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/core/ApplicationHttpRequest.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -70,14 +70,14 @@
* The set of attribute names that are special for request dispatchers.
*/
protected static final String specials[] =
- { Globals.INCLUDE_REQUEST_URI_ATTR, Globals.INCLUDE_CONTEXT_PATH_ATTR,
- Globals.INCLUDE_SERVLET_PATH_ATTR, Globals.INCLUDE_PATH_INFO_ATTR,
- Globals.INCLUDE_QUERY_STRING_ATTR, Globals.FORWARD_REQUEST_URI_ATTR,
- Globals.FORWARD_CONTEXT_PATH_ATTR, Globals.FORWARD_SERVLET_PATH_ATTR,
- Globals.FORWARD_PATH_INFO_ATTR, Globals.FORWARD_QUERY_STRING_ATTR,
- AsyncContext.ASYNC_REQUEST_URI, AsyncContext.ASYNC_CONTEXT_PATH,
- AsyncContext.ASYNC_SERVLET_PATH, AsyncContext.ASYNC_PATH_INFO,
- AsyncContext.ASYNC_QUERY_STRING };
+ { RequestDispatcher.INCLUDE_REQUEST_URI, RequestDispatcher.INCLUDE_CONTEXT_PATH,
+ RequestDispatcher.INCLUDE_SERVLET_PATH, RequestDispatcher.INCLUDE_PATH_INFO,
+ RequestDispatcher.INCLUDE_QUERY_STRING, RequestDispatcher.FORWARD_REQUEST_URI,
+ RequestDispatcher.FORWARD_CONTEXT_PATH, RequestDispatcher.FORWARD_SERVLET_PATH,
+ RequestDispatcher.FORWARD_PATH_INFO, RequestDispatcher.FORWARD_QUERY_STRING,
+ AsyncContext.ASYNC_REQUEST_URI, AsyncContext.ASYNC_CONTEXT_PATH,
+ AsyncContext.ASYNC_SERVLET_PATH, AsyncContext.ASYNC_PATH_INFO,
+ AsyncContext.ASYNC_QUERY_STRING };
/**
@@ -325,7 +325,7 @@
// Convert a request-relative path to a context-relative one
String servletPath =
- (String) getAttribute(Globals.INCLUDE_SERVLET_PATH_ATTR);
+ (String) getAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH);
if (servletPath == null)
servletPath = getServletPath();
Modified: trunk/java/org/apache/catalina/core/ApplicationRequest.java
===================================================================
--- trunk/java/org/apache/catalina/core/ApplicationRequest.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/core/ApplicationRequest.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -22,10 +22,11 @@
import java.util.Enumeration;
import java.util.HashMap;
+import javax.servlet.AsyncContext;
+import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.ServletRequestWrapper;
-import org.apache.catalina.Globals;
import org.apache.catalina.util.Enumerator;
import org.apache.catalina.util.StringManager;
@@ -56,11 +57,14 @@
* The set of attribute names that are special for request dispatchers.
*/
protected static final String specials[] =
- { Globals.INCLUDE_REQUEST_URI_ATTR, Globals.INCLUDE_CONTEXT_PATH_ATTR,
- Globals.INCLUDE_SERVLET_PATH_ATTR, Globals.INCLUDE_PATH_INFO_ATTR,
- Globals.INCLUDE_QUERY_STRING_ATTR, Globals.FORWARD_REQUEST_URI_ATTR,
- Globals.FORWARD_CONTEXT_PATH_ATTR, Globals.FORWARD_SERVLET_PATH_ATTR,
- Globals.FORWARD_PATH_INFO_ATTR, Globals.FORWARD_QUERY_STRING_ATTR };
+ { RequestDispatcher.INCLUDE_REQUEST_URI, RequestDispatcher.INCLUDE_CONTEXT_PATH,
+ RequestDispatcher.INCLUDE_SERVLET_PATH, RequestDispatcher.INCLUDE_PATH_INFO,
+ RequestDispatcher.INCLUDE_QUERY_STRING, RequestDispatcher.FORWARD_REQUEST_URI,
+ RequestDispatcher.FORWARD_CONTEXT_PATH, RequestDispatcher.FORWARD_SERVLET_PATH,
+ RequestDispatcher.FORWARD_PATH_INFO, RequestDispatcher.FORWARD_QUERY_STRING,
+ AsyncContext.ASYNC_REQUEST_URI, AsyncContext.ASYNC_CONTEXT_PATH,
+ AsyncContext.ASYNC_SERVLET_PATH, AsyncContext.ASYNC_PATH_INFO,
+ AsyncContext.ASYNC_QUERY_STRING };
// ----------------------------------------------------------- Constructors
Modified: trunk/java/org/apache/catalina/core/StandardContextValve.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContextValve.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/core/StandardContextValve.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -21,6 +21,7 @@
import java.io.IOException;
+import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletRequestEvent;
@@ -28,7 +29,6 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.catalina.Container;
-import org.apache.catalina.Globals;
import org.apache.catalina.Wrapper;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
@@ -182,7 +182,7 @@
container.getLogger().error(sm.getString("standardContext.requestListener.requestInit",
instances[i].getClass().getName()), t);
ServletRequest sreq = request.getRequest();
- sreq.setAttribute(Globals.EXCEPTION_ATTR,t);
+ sreq.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
return;
}
}
@@ -206,7 +206,7 @@
container.getLogger().error(sm.getString("standardContext.requestListener.requestDestroy",
instances[i].getClass().getName()), t);
ServletRequest sreq = request.getRequest();
- sreq.setAttribute(Globals.EXCEPTION_ATTR,t);
+ sreq.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
}
}
}
@@ -249,7 +249,7 @@
container.getLogger().error(sm.getString("requestListenerValve.requestInit",
instances[i].getClass().getName()), t);
ServletRequest sreq = request.getRequest();
- sreq.setAttribute(Globals.EXCEPTION_ATTR,t);
+ sreq.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
return;
}
}
@@ -274,7 +274,7 @@
container.getLogger().error(sm.getString("requestListenerValve.requestDestroy",
instances[i].getClass().getName()), t);
ServletRequest sreq = request.getRequest();
- sreq.setAttribute(Globals.EXCEPTION_ATTR,t);
+ sreq.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
}
}
}
Modified: trunk/java/org/apache/catalina/core/StandardHostValve.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardHostValve.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/core/StandardHostValve.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -135,7 +135,7 @@
// Error page processing
response.setSuspended(false);
- Throwable t = (Throwable) request.getAttribute(Globals.EXCEPTION_ATTR);
+ Throwable t = (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
if (t != null) {
throwable(request, response, t);
@@ -187,7 +187,7 @@
response.setSuspended(false);
if (request.getAsyncContext() == null) {
- Throwable t = (Throwable) request.getAttribute(Globals.EXCEPTION_ATTR);
+ Throwable t = (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
if (t != null) {
throwable(request, response, t);
} else {
@@ -197,7 +197,7 @@
Request.AsyncContextImpl asyncContext = (Request.AsyncContextImpl) request.getAsyncContext();
if ((event.getType() == EventType.TIMEOUT || event.getType() == EventType.ERROR)
&& request.isEventMode() && asyncContext.getPath() == null) {
- Throwable t = (Throwable) request.getAttribute(Globals.EXCEPTION_ATTR);
+ Throwable t = (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
if (t != null) {
throwable(request, response, t);
} else {
@@ -268,19 +268,19 @@
request.setAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR,
ApplicationFilterFactory.ERROR_INTEGER);
request.setAttribute
- (Globals.STATUS_CODE_ATTR,
+ (RequestDispatcher.ERROR_STATUS_CODE,
Integer.valueOf(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
- request.setAttribute(Globals.ERROR_MESSAGE_ATTR,
+ request.setAttribute(RequestDispatcher.ERROR_MESSAGE,
throwable.getMessage());
- request.setAttribute(Globals.EXCEPTION_ATTR,
+ request.setAttribute(RequestDispatcher.ERROR_EXCEPTION,
realError);
Wrapper wrapper = request.getWrapper();
if (wrapper != null)
- request.setAttribute(Globals.SERVLET_NAME_ATTR,
+ request.setAttribute(RequestDispatcher.ERROR_SERVLET_NAME,
wrapper.getName());
- request.setAttribute(Globals.EXCEPTION_PAGE_ATTR,
+ request.setAttribute(RequestDispatcher.ERROR_REQUEST_URI,
request.getRequestURI());
- request.setAttribute(Globals.EXCEPTION_TYPE_ATTR,
+ request.setAttribute(RequestDispatcher.ERROR_EXCEPTION_TYPE,
realError.getClass());
if (custom(request, response, errorPage)) {
try {
@@ -334,13 +334,13 @@
ErrorPage errorPage = context.findErrorPage(statusCode);
if (errorPage != null) {
response.setAppCommitted(false);
- request.setAttribute(Globals.STATUS_CODE_ATTR,
+ request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE,
Integer.valueOf(statusCode));
String message = response.getMessage();
if (message == null)
message = "";
- request.setAttribute(Globals.ERROR_MESSAGE_ATTR, message);
+ request.setAttribute(RequestDispatcher.ERROR_MESSAGE, message);
request.setAttribute
(ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR,
errorPage.getLocation());
@@ -350,9 +350,9 @@
Wrapper wrapper = request.getWrapper();
if (wrapper != null)
- request.setAttribute(Globals.SERVLET_NAME_ATTR,
+ request.setAttribute(RequestDispatcher.ERROR_SERVLET_NAME,
wrapper.getName());
- request.setAttribute(Globals.EXCEPTION_PAGE_ATTR,
+ request.setAttribute(RequestDispatcher.ERROR_REQUEST_URI,
request.getRequestURI());
if (custom(request, response, errorPage)) {
try {
Modified: trunk/java/org/apache/catalina/core/StandardWrapperValve.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardWrapperValve.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/core/StandardWrapperValve.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -55,6 +55,7 @@
import javax.servlet.AsyncContext;
import javax.servlet.AsyncEvent;
import javax.servlet.AsyncListener;
+import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
@@ -639,7 +640,7 @@
asyncListenerRegistration.getRequest(), asyncListenerRegistration.getResponse());
asyncListener.onTimeout(asyncEvent);
} else if (error) {
- Throwable t = (Throwable) request.getAttribute(Globals.EXCEPTION_ATTR);
+ Throwable t = (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
AsyncEvent asyncEvent = new AsyncEvent(asyncContext,
asyncListenerRegistration.getRequest(), asyncListenerRegistration.getResponse(), t);
asyncListener.onError(asyncEvent);
@@ -716,7 +717,7 @@
*/
private void exception(Request request, Response response,
Throwable exception) {
- request.setAttribute(Globals.EXCEPTION_ATTR, exception);
+ request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, exception);
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
Modified: trunk/java/org/apache/catalina/servlets/CGIServlet.java
===================================================================
--- trunk/java/org/apache/catalina/servlets/CGIServlet.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/servlets/CGIServlet.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -36,6 +36,7 @@
import java.util.StringTokenizer;
import java.util.Vector;
+import javax.servlet.RequestDispatcher;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
@@ -47,7 +48,6 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
-import org.apache.catalina.Globals;
import org.apache.catalina.util.IOTools;
@@ -560,11 +560,6 @@
protected void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
- // Verify that we were not accessed using the invoker servlet
- if (req.getAttribute(Globals.INVOKED_ATTR) != null)
- throw new UnavailableException
- ("Cannot invoke CGIServlet through the invoker");
-
CGIEnvironment cgiEnv = new CGIEnvironment(req, getServletContext());
if (cgiEnv.isValid()) {
@@ -733,16 +728,16 @@
boolean isIncluded = false;
// Look to see if this request is an include
- if (req.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null) {
+ if (req.getAttribute(RequestDispatcher.INCLUDE_REQUEST_URI) != null) {
isIncluded = true;
}
if (isIncluded) {
this.contextPath = (String) req.getAttribute(
- Globals.INCLUDE_CONTEXT_PATH_ATTR);
+ RequestDispatcher.INCLUDE_CONTEXT_PATH);
this.servletPath = (String) req.getAttribute(
- Globals.INCLUDE_SERVLET_PATH_ATTR);
+ RequestDispatcher.INCLUDE_SERVLET_PATH);
this.pathInfo = (String) req.getAttribute(
- Globals.INCLUDE_PATH_INFO_ATTR);
+ RequestDispatcher.INCLUDE_PATH_INFO);
} else {
this.contextPath = req.getContextPath();
this.servletPath = req.getServletPath();
@@ -764,7 +759,7 @@
String qs;
if (isIncluded) {
qs = (String) req.getAttribute(
- Globals.INCLUDE_QUERY_STRING_ATTR);
+ RequestDispatcher.INCLUDE_QUERY_STRING);
} else {
qs = req.getQueryString();
}
Modified: trunk/java/org/apache/catalina/servlets/DefaultServlet.java
===================================================================
--- trunk/java/org/apache/catalina/servlets/DefaultServlet.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/servlets/DefaultServlet.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -43,6 +43,7 @@
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
+import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
@@ -300,12 +301,12 @@
protected String getRelativePath(HttpServletRequest request) {
// Are we being processed by a RequestDispatcher.include()?
- if (request.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null) {
+ if (request.getAttribute(RequestDispatcher.INCLUDE_REQUEST_URI) != null) {
String result = (String) request.getAttribute(
- Globals.INCLUDE_PATH_INFO_ATTR);
+ RequestDispatcher.INCLUDE_PATH_INFO);
if (result == null)
result = (String) request.getAttribute(
- Globals.INCLUDE_SERVLET_PATH_ATTR);
+ RequestDispatcher.INCLUDE_SERVLET_PATH);
if ((result == null) || (result.equals("")))
result = "/";
return (result);
@@ -644,7 +645,7 @@
// Check if we're included so we can return the appropriate
// missing resource name in the error
String requestUri = (String) request.getAttribute(
- Globals.INCLUDE_REQUEST_URI_ATTR);
+ RequestDispatcher.INCLUDE_REQUEST_URI);
if (requestUri == null) {
requestUri = request.getRequestURI();
} else {
@@ -667,7 +668,7 @@
// Check if we're included so we can return the appropriate
// missing resource name in the error
String requestUri = (String) request.getAttribute(
- Globals.INCLUDE_REQUEST_URI_ATTR);
+ RequestDispatcher.INCLUDE_REQUEST_URI);
if (requestUri == null) {
requestUri = request.getRequestURI();
}
@@ -683,7 +684,7 @@
// Checking If headers
boolean included =
- (request.getAttribute(Globals.INCLUDE_CONTEXT_PATH_ATTR) != null);
+ (request.getAttribute(RequestDispatcher.INCLUDE_CONTEXT_PATH) != null);
if (!included
&& !checkIfHeaders(request, response, cacheEntry.attributes)) {
return;
Modified: trunk/java/org/apache/catalina/servlets/WebdavServlet.java
===================================================================
--- trunk/java/org/apache/catalina/servlets/WebdavServlet.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/servlets/WebdavServlet.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -38,6 +38,7 @@
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
+import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.UnavailableException;
@@ -47,7 +48,6 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import org.apache.catalina.Globals;
import org.apache.catalina.util.DOMWriter;
import org.apache.catalina.util.MD5Encoder;
import org.apache.catalina.util.RequestUtil;
@@ -375,9 +375,9 @@
*/
protected String getRelativePath(HttpServletRequest request) {
// Are we being processed by a RequestDispatcher.include()?
- if (request.getAttribute(Globals.INCLUDE_REQUEST_URI_ATTR) != null) {
+ if (request.getAttribute(RequestDispatcher.INCLUDE_REQUEST_URI) != null) {
String result = (String) request.getAttribute(
- Globals.INCLUDE_PATH_INFO_ATTR);
+ RequestDispatcher.INCLUDE_PATH_INFO);
if ((result == null) || (result.equals("")))
result = "/";
return (result);
Modified: trunk/java/org/apache/catalina/valves/ErrorReportValve.java
===================================================================
--- trunk/java/org/apache/catalina/valves/ErrorReportValve.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/apache/catalina/valves/ErrorReportValve.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -22,10 +22,10 @@
import java.io.IOException;
import java.io.Writer;
+import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
-import org.apache.catalina.Globals;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.RequestUtil;
@@ -102,7 +102,7 @@
getNext().invoke(request, response);
Throwable throwable =
- (Throwable) request.getAttribute(Globals.EXCEPTION_ATTR);
+ (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
if (response.isCommitted()) {
return;
Modified: trunk/java/org/jboss/web/php/Handler.java
===================================================================
--- trunk/java/org/jboss/web/php/Handler.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/jboss/web/php/Handler.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -184,11 +184,6 @@
throws ServletException, IOException
{
- // Verify that we were not accessed using the invoker servlet
- if (req.getAttribute(Globals.INVOKED_ATTR) != null)
- throw new UnavailableException
- ("Cannot invoke PHP Gateway Handler through the invoker");
-
ScriptEnvironment env = new ScriptEnvironment(req,
getServletContext(),
scriptPathPrefix);
Modified: trunk/java/org/jboss/web/php/ScriptEnvironment.java
===================================================================
--- trunk/java/org/jboss/web/php/ScriptEnvironment.java 2010-04-30 23:46:34 UTC (rev 1457)
+++ trunk/java/org/jboss/web/php/ScriptEnvironment.java 2010-04-30 23:47:43 UTC (rev 1458)
@@ -33,10 +33,10 @@
import java.util.StringTokenizer;
import java.util.Vector;
+import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
-import org.apache.catalina.Globals;
import org.apache.catalina.util.IOTools;
import org.jboss.logging.Logger;
@@ -572,11 +572,11 @@
this.tempDir = (File)context.getAttribute(ServletContext.TEMPDIR);
- if (req.getAttribute(Globals.INCLUDE_CONTEXT_PATH_ATTR) != null) {
+ if (req.getAttribute(RequestDispatcher.INCLUDE_CONTEXT_PATH) != null) {
// Include
- this.contextPath = (String) req.getAttribute(Globals.INCLUDE_CONTEXT_PATH_ATTR);
- this.servletPath = (String) req.getAttribute(Globals.INCLUDE_SERVLET_PATH_ATTR);
- this.pathInfo = (String) req.getAttribute(Globals.INCLUDE_PATH_INFO_ATTR);
+ this.contextPath = (String) req.getAttribute(RequestDispatcher.INCLUDE_CONTEXT_PATH);
+ this.servletPath = (String) req.getAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH);
+ this.pathInfo = (String) req.getAttribute(RequestDispatcher.INCLUDE_PATH_INFO);
}
else {
// Direct call
14 years, 7 months
JBossWeb SVN: r1457 - trunk.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-04-30 19:46:34 -0400 (Fri, 30 Apr 2010)
New Revision: 1457
Modified:
trunk/build.xml
Log:
- Use Nexus info (not tested yet).
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2010-04-30 13:01:52 UTC (rev 1456)
+++ trunk/build.xml 2010-04-30 23:46:34 UTC (rev 1457)
@@ -490,10 +490,8 @@
</copy>
<!-- Maven repository configuration -->
- <property name="maven.repository.url" value="file:///somepath"/>
- <property name="maven.repository.id" value="repository.jboss.org"/>
- <!--<property name="maven.repository.url" value="dav:https://snapshots.jboss.org/maven2"/>
- <property name="maven.repository.id" value="snapshots.jboss.org"/>-->
+ <property name="maven.repository.url" value="https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/"/>
+ <property name="maven.repository.id" value="jboss-releases-repository"/>
<!-- Linux/Unix execs -->
<exec dir="." executable="/bin/sh" os="Linux">
14 years, 7 months
JBossWeb SVN: r1456 - trunk/java/org/apache/catalina/core.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-04-30 09:01:52 -0400 (Fri, 30 Apr 2010)
New Revision: 1456
Modified:
trunk/java/org/apache/catalina/core/StandardContext.java
Log:
- Drop mkdirs.
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2010-04-29 23:18:51 UTC (rev 1455)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2010-04-30 13:01:52 UTC (rev 1456)
@@ -116,10 +116,6 @@
{
protected static Logger log = Logger.getLogger(StandardContext.class);
- public static final boolean CONFIGBASE_MKDIRS =
- Boolean.valueOf(System.getProperty("org.apache.catalina.core.CONFIGBASE_MKDIRS", "false")).booleanValue();
-
-
// ----------------------------------------------------------- Constructors
@@ -4312,9 +4308,6 @@
if (host != null) {
configBase = new File(configBase, host.getName());
}
- if (CONFIGBASE_MKDIRS) {
- configBase.mkdirs();
- }
return configBase;
}
14 years, 7 months
JBossWeb SVN: r1455 - trunk/java/org/apache/catalina/connector.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-04-29 19:18:51 -0400 (Thu, 29 Apr 2010)
New Revision: 1455
Modified:
trunk/java/org/apache/catalina/connector/CoyotePrincipal.java
Log:
- Port patch.
Modified: trunk/java/org/apache/catalina/connector/CoyotePrincipal.java
===================================================================
--- trunk/java/org/apache/catalina/connector/CoyotePrincipal.java 2010-04-28 09:02:54 UTC (rev 1454)
+++ trunk/java/org/apache/catalina/connector/CoyotePrincipal.java 2010-04-29 23:18:51 UTC (rev 1455)
@@ -18,6 +18,7 @@
package org.apache.catalina.connector;
+import java.io.Serializable;
import java.security.Principal;
/**
@@ -29,7 +30,7 @@
*/
public class CoyotePrincipal
- implements Principal {
+ implements Principal, Serializable {
// ----------------------------------------------------------- Constructors
14 years, 7 months
JBossWeb SVN: r1454 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-04-28 05:02:54 -0400 (Wed, 28 Apr 2010)
New Revision: 1454
Modified:
trunk/java/org/apache/catalina/core/StandardContext.java
trunk/webapps/docs/changelog.xml
Log:
- Refix addBefore.
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2010-04-27 10:03:51 UTC (rev 1453)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2010-04-28 09:02:54 UTC (rev 1454)
@@ -2001,14 +2001,11 @@
// Add this filter mapping to our registered set
FilterMap results[] = new FilterMap[filterMaps.length + 1];
System.arraycopy(filterMaps, 0, results, 0, filterMapInsertPoint);
- results[filterMapInsertPoint] = filterMap;
System.arraycopy(filterMaps, filterMapInsertPoint, results,
- filterMaps.length - (filterMapInsertPoint + 1),
+ filterMapInsertPoint + 1,
filterMaps.length - filterMapInsertPoint);
-
+ results[filterMapInsertPoint] = filterMap;
filterMapInsertPoint++;
-
- results[filterMaps.length] = filterMap;
filterMaps = results;
fireContainerEvent("addFilterMap", filterMap);
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2010-04-27 10:03:51 UTC (rev 1453)
+++ trunk/webapps/docs/changelog.xml 2010-04-28 09:02:54 UTC (rev 1454)
@@ -32,7 +32,7 @@
Default realm name with BASIC and DIGEST. (markt)
</fix>
<fix>
- Add filter before method fix. (markt)
+ Add filter before method fix. (markt, kkolinko)
</fix>
</changelog>
</subsection>
14 years, 8 months
JBossWeb SVN: r1453 - in trunk/java/org/apache/catalina: startup and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-04-27 06:03:51 -0400 (Tue, 27 Apr 2010)
New Revision: 1453
Removed:
trunk/java/org/apache/catalina/startup/CatalinaProperties.java
trunk/java/org/apache/catalina/startup/catalina.properties
Modified:
trunk/java/org/apache/catalina/security/SecurityConfig.java
Log:
- Drop CatalinaProperties, system properties should be set by the embedding program.
Modified: trunk/java/org/apache/catalina/security/SecurityConfig.java
===================================================================
--- trunk/java/org/apache/catalina/security/SecurityConfig.java 2010-04-26 20:32:49 UTC (rev 1452)
+++ trunk/java/org/apache/catalina/security/SecurityConfig.java 2010-04-27 10:03:51 UTC (rev 1453)
@@ -17,7 +17,6 @@
package org.apache.catalina.security;
import java.security.Security;
-import org.apache.catalina.startup.CatalinaProperties;
/**
* Util class to protect Catalina against package access and insertion.
@@ -59,14 +58,8 @@
* Create a single instance of this class.
*/
private SecurityConfig(){
- try{
- packageDefinition = CatalinaProperties.getProperty("package.definition");
- packageAccess = CatalinaProperties.getProperty("package.access");
- } catch (java.lang.Exception ex){
- if (log.isDebugEnabled()){
- log.debug("Unable to load properties using CatalinaProperties", ex);
- }
- }
+ packageDefinition = System.getProperty("package.definition");
+ packageAccess = System.getProperty("package.access");
}
Deleted: trunk/java/org/apache/catalina/startup/CatalinaProperties.java
===================================================================
--- trunk/java/org/apache/catalina/startup/CatalinaProperties.java 2010-04-26 20:32:49 UTC (rev 1452)
+++ trunk/java/org/apache/catalina/startup/CatalinaProperties.java 2010-04-27 10:03:51 UTC (rev 1453)
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.apache.catalina.startup;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.Properties;
-
-
-/**
- * Utility class to read the bootstrap Catalina configuration.
- *
- * @author Remy Maucherat
- * @version $Revision$ $Date$
- */
-
-public class CatalinaProperties {
-
-
- // ------------------------------------------------------- Static Variables
-
- private static org.jboss.logging.Logger log=
- org.jboss.logging.Logger.getLogger( CatalinaProperties.class );
-
- private static Properties properties = null;
-
-
- static {
-
- loadProperties();
-
- }
-
-
- // --------------------------------------------------------- Public Methods
-
-
- /**
- * Return specified property value.
- */
- public static String getProperty(String name) {
-
- return properties.getProperty(name);
-
- }
-
-
- /**
- * Return specified property value.
- */
- public static String getProperty(String name, String defaultValue) {
-
- return properties.getProperty(name, defaultValue);
-
- }
-
-
- // --------------------------------------------------------- Public Methods
-
-
- /**
- * Load properties.
- */
- private static void loadProperties() {
-
- InputStream is = null;
- Throwable error = null;
-
- try {
- String configUrl = getConfigUrl();
- if (configUrl != null) {
- is = (new URL(configUrl)).openStream();
- }
- } catch (Throwable t) {
- // Ignore
- }
-
- if (is == null) {
- try {
- File home = new File(getCatalinaBase());
- File conf = new File(home, "conf");
- File properties = new File(conf, "catalina.properties");
- is = new FileInputStream(properties);
- } catch (Throwable t) {
- // Ignore
- }
- }
-
- if (is == null) {
- try {
- is = CatalinaProperties.class.getResourceAsStream("catalina.properties");
- } catch (Throwable t) {
- // Ignore
- }
- }
-
- if (is == null) {
- try {
- is = CatalinaProperties.class.getResourceAsStream
- ("/org/apache/catalina/startup/catalina.properties");
- } catch (Throwable t) {
- // Ignore
- }
- }
-
- if (is != null) {
- try {
- properties = new Properties();
- properties.load(is);
- is.close();
- } catch (Throwable t) {
- error = t;
- }
- }
-
- if ((is == null) || (error != null)) {
- // Do something
- log.warn("Failed to load catalina.properties", error);
- // That's fine - we have reasonable defaults.
- properties=new Properties();
- }
-
- // Register the properties as system properties
- Enumeration enumeration = properties.propertyNames();
- while (enumeration.hasMoreElements()) {
- String name = (String) enumeration.nextElement();
- String value = properties.getProperty(name);
- if (value != null && (System.getProperty(name) == null)) {
- System.setProperty(name, value);
- }
- }
-
- }
-
-
- /**
- * Get the value of the catalina.home environment variable.
- */
- private static String getCatalinaHome() {
- return System.getProperty("catalina.home",
- System.getProperty("user.dir"));
- }
-
-
- /**
- * Get the value of the catalina.base environment variable.
- */
- private static String getCatalinaBase() {
- return System.getProperty("catalina.base", getCatalinaHome());
- }
-
-
- /**
- * Get the value of the configuration URL.
- */
- private static String getConfigUrl() {
- return System.getProperty("catalina.config");
- }
-
-
-}
Deleted: trunk/java/org/apache/catalina/startup/catalina.properties
===================================================================
14 years, 8 months
JBossWeb SVN: r1452 - trunk/java/org/apache/catalina/startup.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-04-26 16:32:49 -0400 (Mon, 26 Apr 2010)
New Revision: 1452
Modified:
trunk/java/org/apache/catalina/startup/catalina.properties
Log:
- Use a blank default, AS will have catalina.properties as a regular config file.
Modified: trunk/java/org/apache/catalina/startup/catalina.properties
===================================================================
--- trunk/java/org/apache/catalina/startup/catalina.properties 2010-04-26 14:00:51 UTC (rev 1451)
+++ trunk/java/org/apache/catalina/startup/catalina.properties 2010-04-26 20:32:49 UTC (rev 1452)
@@ -1,16 +0,0 @@
-# JBoss AS configuration
-org.apache.catalina.STRICT_SERVLET_COMPLIANCE=true
-org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true
-org.apache.jasper.Constants.INJECT_TAGS=false
-org.apache.jasper.Constants.USE_INSTANCE_MANAGER_FOR_TAGS=false
-org.apache.catalina.connector.Connector.X_POWERED_BY=true
-org.apache.catalina.connector.Request.SESSION_ID_CHECK=true
-org.apache.catalina.connector.CoyoteAdapter.X_POWERED_BY=Servlet/3.0; JBossAS-6
-org.apache.catalina.core.StandardHost.configClass=org.jboss.web.tomcat.service.deployers.JBossContextConfig
-org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR=false
-
-# String cache configuration.
-org.apache.tomcat.util.buf.StringCache.byte.enabled=true
-#org.apache.tomcat.util.buf.StringCache.char.enabled=true
-#org.apache.tomcat.util.buf.StringCache.trainThreshold=500000
-#org.apache.tomcat.util.buf.StringCache.cacheSize=5000
14 years, 8 months
JBossWeb SVN: r1451 - trunk/java/org/apache/naming/resources.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-04-26 10:00:51 -0400 (Mon, 26 Apr 2010)
New Revision: 1451
Modified:
trunk/java/org/apache/naming/resources/ProxyDirContext.java
Log:
- Problem was list throws a NamingException when not found. So move the code blocks inside the try/catch.
Modified: trunk/java/org/apache/naming/resources/ProxyDirContext.java
===================================================================
--- trunk/java/org/apache/naming/resources/ProxyDirContext.java 2010-04-26 13:45:57 UTC (rev 1450)
+++ trunk/java/org/apache/naming/resources/ProxyDirContext.java 2010-04-26 14:00:51 UTC (rev 1451)
@@ -519,26 +519,26 @@
NamingEnumeration<NameClassPair> overlay = null;
try {
overlay = overlays[i].list(parseName(name));
- } catch (NamingException e) {
- // Ignore
- }
- if (main == null) {
- main = overlay;
- } else {
- // Merge that into the merged set
- if (merged == null) {
- merged = new HashMap<String, NameClassPair>();
- while (main.hasMore()) {
- NameClassPair pair = main.next();
- merged.put(pair.getName(), pair);
+ if (main == null) {
+ main = overlay;
+ } else {
+ // Merge that into the merged set
+ if (merged == null) {
+ merged = new HashMap<String, NameClassPair>();
+ while (main.hasMore()) {
+ NameClassPair pair = main.next();
+ merged.put(pair.getName(), pair);
+ }
}
- }
- while (overlay.hasMore()) {
- NameClassPair pair = overlay.next();
- if (merged.get(pair.getName()) == null) {
- merged.put(pair.getName(), pair);
+ while (overlay.hasMore()) {
+ NameClassPair pair = overlay.next();
+ if (merged.get(pair.getName()) == null) {
+ merged.put(pair.getName(), pair);
+ }
}
}
+ } catch (NamingException e) {
+ // Ignore
}
}
if (main == null && merged == null) {
@@ -578,26 +578,26 @@
NamingEnumeration<NameClassPair> overlay = null;
try {
overlay = overlays[i].list(parseName(name));
- } catch (NamingException e) {
- // Ignore
- }
- if (main == null) {
- main = overlay;
- } else {
- // Merge that into the merged set
- if (merged == null) {
- merged = new HashMap<String, NameClassPair>();
- while (main.hasMore()) {
- NameClassPair pair = main.next();
- merged.put(pair.getName(), pair);
+ if (main == null) {
+ main = overlay;
+ } else {
+ // Merge that into the merged set
+ if (merged == null) {
+ merged = new HashMap<String, NameClassPair>();
+ while (main.hasMore()) {
+ NameClassPair pair = main.next();
+ merged.put(pair.getName(), pair);
+ }
}
- }
- while (overlay.hasMore()) {
- NameClassPair pair = overlay.next();
- if (merged.get(pair.getName()) == null) {
- merged.put(pair.getName(), pair);
+ while (overlay.hasMore()) {
+ NameClassPair pair = overlay.next();
+ if (merged.get(pair.getName()) == null) {
+ merged.put(pair.getName(), pair);
+ }
}
}
+ } catch (NamingException e) {
+ // Ignore
}
}
if (main == null && merged == null) {
@@ -641,26 +641,26 @@
NamingEnumeration<Binding> overlay = null;
try {
overlay = overlays[i].listBindings(parseName(name));
- } catch (NamingException e) {
- // Ignore
- }
- if (main == null) {
- main = overlay;
- } else {
- // Merge that into the merged set
- if (merged == null) {
- merged = new HashMap<String, Binding>();
- while (main.hasMore()) {
- Binding pair = main.next();
- merged.put(pair.getName(), pair);
+ if (main == null) {
+ main = overlay;
+ } else {
+ // Merge that into the merged set
+ if (merged == null) {
+ merged = new HashMap<String, Binding>();
+ while (main.hasMore()) {
+ Binding pair = main.next();
+ merged.put(pair.getName(), pair);
+ }
}
- }
- while (overlay.hasMore()) {
- Binding pair = overlay.next();
- if (merged.get(pair.getName()) == null) {
- merged.put(pair.getName(), pair);
+ while (overlay.hasMore()) {
+ Binding pair = overlay.next();
+ if (merged.get(pair.getName()) == null) {
+ merged.put(pair.getName(), pair);
+ }
}
}
+ } catch (NamingException e) {
+ // Ignore
}
}
if (main == null && merged == null) {
@@ -700,26 +700,26 @@
NamingEnumeration<Binding> overlay = null;
try {
overlay = overlays[i].listBindings(parseName(name));
- } catch (NamingException e) {
- // Ignore
- }
- if (main == null) {
- main = overlay;
- } else {
- // Merge that into the merged set
- if (merged == null) {
- merged = new HashMap<String, Binding>();
- while (main.hasMore()) {
- Binding pair = main.next();
- merged.put(pair.getName(), pair);
+ if (main == null) {
+ main = overlay;
+ } else {
+ // Merge that into the merged set
+ if (merged == null) {
+ merged = new HashMap<String, Binding>();
+ while (main.hasMore()) {
+ Binding pair = main.next();
+ merged.put(pair.getName(), pair);
+ }
}
- }
- while (overlay.hasMore()) {
- Binding pair = overlay.next();
- if (merged.get(pair.getName()) == null) {
- merged.put(pair.getName(), pair);
+ while (overlay.hasMore()) {
+ Binding pair = overlay.next();
+ if (merged.get(pair.getName()) == null) {
+ merged.put(pair.getName(), pair);
+ }
}
}
+ } catch (NamingException e) {
+ // Ignore
}
}
if (main == null && merged == null) {
14 years, 8 months
JBossWeb SVN: r1450 - trunk/java/org/apache/naming/resources.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-04-26 09:45:57 -0400 (Mon, 26 Apr 2010)
New Revision: 1450
Modified:
trunk/java/org/apache/naming/resources/ProxyDirContext.java
Log:
- Add a IAE on null overlay (see JBAS-7775).
Modified: trunk/java/org/apache/naming/resources/ProxyDirContext.java
===================================================================
--- trunk/java/org/apache/naming/resources/ProxyDirContext.java 2010-04-26 10:34:47 UTC (rev 1449)
+++ trunk/java/org/apache/naming/resources/ProxyDirContext.java 2010-04-26 13:45:57 UTC (rev 1450)
@@ -263,6 +263,9 @@
* Add overlay.
*/
public void addOverlay(DirContext overlay) {
+ if (overlay == null) {
+ throw new IllegalArgumentException("Overlay cannot be null");
+ }
if (overlays == null) {
overlays = new DirContext[0];
}
14 years, 8 months
JBossWeb SVN: r1449 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2010-04-26 06:34:47 -0400 (Mon, 26 Apr 2010)
New Revision: 1449
Modified:
trunk/java/org/apache/catalina/core/StandardContext.java
trunk/webapps/docs/changelog.xml
Log:
- Port add filter before method fix.
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2010-04-23 16:02:40 UTC (rev 1448)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2010-04-26 10:34:47 UTC (rev 1449)
@@ -2003,8 +2003,8 @@
System.arraycopy(filterMaps, 0, results, 0, filterMapInsertPoint);
results[filterMapInsertPoint] = filterMap;
System.arraycopy(filterMaps, filterMapInsertPoint, results,
- filterMaps.length - filterMapInsertPoint+1,
- filterMapInsertPoint);
+ filterMaps.length - (filterMapInsertPoint + 1),
+ filterMaps.length - filterMapInsertPoint);
filterMapInsertPoint++;
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2010-04-23 16:02:40 UTC (rev 1448)
+++ trunk/webapps/docs/changelog.xml 2010-04-26 10:34:47 UTC (rev 1449)
@@ -31,6 +31,9 @@
<fix>
Default realm name with BASIC and DIGEST. (markt)
</fix>
+ <fix>
+ Add filter before method fix. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
14 years, 8 months