Author: remy.maucherat(a)jboss.com
Date: 2009-06-22 10:08:27 -0400 (Mon, 22 Jun 2009)
New Revision: 1120
Modified:
trunk/java/org/apache/catalina/Globals.java
trunk/java/org/apache/catalina/core/ContextJarRepository.java
trunk/java/org/apache/catalina/core/StandardContext.java
trunk/java/org/apache/catalina/loader/LegacyWebappLoader.java
trunk/java/org/apache/catalina/loader/WebappLoader.java
trunk/java/org/apache/catalina/servlets/CGIServlet.java
trunk/java/org/apache/catalina/session/FileStore.java
trunk/java/org/apache/catalina/session/StandardManager.java
trunk/java/org/jboss/web/php/ScriptEnvironment.java
Log:
- Sync: use the regular Servlet API constant.
Modified: trunk/java/org/apache/catalina/Globals.java
===================================================================
--- trunk/java/org/apache/catalina/Globals.java 2009-06-22 14:07:44 UTC (rev 1119)
+++ trunk/java/org/apache/catalina/Globals.java 2009-06-22 14:08:27 UTC (rev 1120)
@@ -342,15 +342,6 @@
/**
- * The servlet context attribute under which we store a temporary
- * working directory (as an object of type File) for use by servlets
- * within this web application.
- */
- public static final String WORK_DIR_ATTR =
- "javax.servlet.context.tempdir";
-
-
- /**
* The master flag which controls strict servlet specification
* compliance.
*/
Modified: trunk/java/org/apache/catalina/core/ContextJarRepository.java
===================================================================
--- trunk/java/org/apache/catalina/core/ContextJarRepository.java 2009-06-22 14:07:44 UTC
(rev 1119)
+++ trunk/java/org/apache/catalina/core/ContextJarRepository.java 2009-06-22 14:08:27 UTC
(rev 1120)
@@ -66,7 +66,6 @@
import org.apache.catalina.Contained;
import org.apache.catalina.Container;
import org.apache.catalina.Context;
-import org.apache.catalina.Globals;
import org.apache.catalina.JarRepository;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleException;
@@ -301,7 +300,7 @@
return;
// Access work directory
- File workDir = (File) servletContext.getAttribute(Globals.WORK_DIR_ATTR);
+ File workDir = (File) servletContext.getAttribute(ServletContext.TEMPDIR);
if (workDir == null) {
// FIXME: this is actually an error
log.info("No work dir for " + servletContext);
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2009-06-22 14:07:44 UTC (rev
1119)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2009-06-22 14:08:27 UTC (rev
1120)
@@ -4922,10 +4922,10 @@
dir.mkdirs();
// Set the appropriate servlet context attribute
- getServletContext().setAttribute(Globals.WORK_DIR_ATTR, dir);
+ getServletContext().setAttribute(ServletContext.TEMPDIR, dir);
if (getServletContext() instanceof ApplicationContext)
((ApplicationContext) getServletContext()).setAttributeReadOnly
- (Globals.WORK_DIR_ATTR);
+ (ServletContext.TEMPDIR);
}
Modified: trunk/java/org/apache/catalina/loader/LegacyWebappLoader.java
===================================================================
--- trunk/java/org/apache/catalina/loader/LegacyWebappLoader.java 2009-06-22 14:07:44 UTC
(rev 1119)
+++ trunk/java/org/apache/catalina/loader/LegacyWebappLoader.java 2009-06-22 14:08:27 UTC
(rev 1120)
@@ -801,7 +801,7 @@
// Assigning permissions for the work directory
File workDir =
- (File) servletContext.getAttribute(Globals.WORK_DIR_ATTR);
+ (File) servletContext.getAttribute(ServletContext.TEMPDIR);
if (workDir != null) {
try {
String workDirPath = workDir.getCanonicalPath();
@@ -892,7 +892,7 @@
loaderRepositories=new ArrayList();
// Loading the work directory
File workDir =
- (File) servletContext.getAttribute(Globals.WORK_DIR_ATTR);
+ (File) servletContext.getAttribute(ServletContext.TEMPDIR);
if (workDir == null) {
log.info("No work dir for " + servletContext);
}
Modified: trunk/java/org/apache/catalina/loader/WebappLoader.java
===================================================================
--- trunk/java/org/apache/catalina/loader/WebappLoader.java 2009-06-22 14:07:44 UTC (rev
1119)
+++ trunk/java/org/apache/catalina/loader/WebappLoader.java 2009-06-22 14:08:27 UTC (rev
1120)
@@ -574,7 +574,7 @@
throw new IllegalStateException("No servlet context
available");
File workDir =
- (File) servletContext.getAttribute(Globals.WORK_DIR_ATTR);
+ (File) servletContext.getAttribute(ServletContext.TEMPDIR);
if (workDir == null) {
log.info("No work dir for " + servletContext);
}
@@ -734,7 +734,7 @@
// Assigning permissions for the work directory
File workDir =
- (File) servletContext.getAttribute(Globals.WORK_DIR_ATTR);
+ (File) servletContext.getAttribute(ServletContext.TEMPDIR);
if (workDir != null) {
try {
String workDirPath = workDir.getCanonicalPath();
Modified: trunk/java/org/apache/catalina/servlets/CGIServlet.java
===================================================================
--- trunk/java/org/apache/catalina/servlets/CGIServlet.java 2009-06-22 14:07:44 UTC (rev
1119)
+++ trunk/java/org/apache/catalina/servlets/CGIServlet.java 2009-06-22 14:08:27 UTC (rev
1120)
@@ -715,7 +715,7 @@
protected void setupFromContext(ServletContext context) {
this.context = context;
this.webAppRootDir = context.getRealPath("/");
- this.tmpDir = (File) context.getAttribute(Globals.WORK_DIR_ATTR);
+ this.tmpDir = (File) context.getAttribute(ServletContext.TEMPDIR);
}
Modified: trunk/java/org/apache/catalina/session/FileStore.java
===================================================================
--- trunk/java/org/apache/catalina/session/FileStore.java 2009-06-22 14:07:44 UTC (rev
1119)
+++ trunk/java/org/apache/catalina/session/FileStore.java 2009-06-22 14:08:27 UTC (rev
1120)
@@ -401,7 +401,7 @@
ServletContext servletContext =
((Context) container).getServletContext();
File work = (File)
- servletContext.getAttribute(Globals.WORK_DIR_ATTR);
+ servletContext.getAttribute(ServletContext.TEMPDIR);
file = new File(work, this.directory);
} else {
throw new IllegalArgumentException
Modified: trunk/java/org/apache/catalina/session/StandardManager.java
===================================================================
--- trunk/java/org/apache/catalina/session/StandardManager.java 2009-06-22 14:07:44 UTC
(rev 1119)
+++ trunk/java/org/apache/catalina/session/StandardManager.java 2009-06-22 14:08:27 UTC
(rev 1120)
@@ -34,19 +34,19 @@
import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.Iterator;
+
import javax.servlet.ServletContext;
+
import org.apache.catalina.Container;
import org.apache.catalina.Context;
-import org.apache.catalina.Globals;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.Loader;
import org.apache.catalina.Session;
+import org.apache.catalina.security.SecurityUtil;
import org.apache.catalina.util.CustomObjectInputStream;
import org.apache.catalina.util.LifecycleSupport;
-
-import org.apache.catalina.security.SecurityUtil;
/**
* Standard implementation of the <b>Manager</b> interface that provides
* simple session persistence across restarts of this component (such as
@@ -738,7 +738,7 @@
ServletContext servletContext =
((Context) container).getServletContext();
File tempdir = (File)
- servletContext.getAttribute(Globals.WORK_DIR_ATTR);
+ servletContext.getAttribute(ServletContext.TEMPDIR);
if (tempdir != null)
file = new File(tempdir, pathname);
}
Modified: trunk/java/org/jboss/web/php/ScriptEnvironment.java
===================================================================
--- trunk/java/org/jboss/web/php/ScriptEnvironment.java 2009-06-22 14:07:44 UTC (rev
1119)
+++ trunk/java/org/jboss/web/php/ScriptEnvironment.java 2009-06-22 14:08:27 UTC (rev
1120)
@@ -39,7 +39,6 @@
import org.apache.catalina.Globals;
import org.apache.catalina.util.IOTools;
import org.jboss.logging.Logger;
-import org.jboss.logging.Logger;
/**
@@ -570,7 +569,7 @@
this.scriptPathPrefix = scriptPathPrefix;
this.context = context;
this.webAppRootDir = context.getRealPath("/");
- this.tempDir = (File)context.getAttribute(Globals.WORK_DIR_ATTR);
+ this.tempDir = (File)context.getAttribute(ServletContext.TEMPDIR);
if (req.getAttribute(Globals.INCLUDE_CONTEXT_PATH_ATTR) != null) {
Show replies by date