Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2009-03-29 02:15:22 +0000
committerGreg Wilkins2009-03-29 02:15:22 +0000
commit0f510e6753a0b90f6b1279397976dfb279548fa0 (patch)
tree4f98e5610c79272e71ae195ff6a0142da0b24f93 /jetty-webapp
parentff76d89682fdbd4478bd23243e1bd7c7d9092487 (diff)
downloadorg.eclipse.jetty.project-0f510e6753a0b90f6b1279397976dfb279548fa0.tar.gz
org.eclipse.jetty.project-0f510e6753a0b90f6b1279397976dfb279548fa0.tar.xz
org.eclipse.jetty.project-0f510e6753a0b90f6b1279397976dfb279548fa0.zip
This commit takes jetty-7 back to the 2.5 servlet API, but leaves much of the
3.0 asynchronous machinery available. Introduces a new improved Continuation API that is an evolution of the original Continuation API, while taking some good ideas from the 3.0 spec. The intention is that this API will simplify the use of the 3.0 API, while making it available in jetty-7 (scalably) and in all other 2.5 containers with the ContinuationFilter. git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@27 7e9141cc-0065-0410-87d8-b60c137991c4
Diffstat (limited to 'jetty-webapp')
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java29
1 files changed, 15 insertions, 14 deletions
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java
index 5dbafa6f2d..626f0ec4a4 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java
@@ -65,6 +65,7 @@ import org.eclipse.jetty.util.resource.Resource;
*/
public class WebAppContext extends ServletContextHandler
{
+ public static final String TEMPDIR = "javax.servlet.context.tempdir";
public final static String WEB_DEFAULTS_XML="org/eclipse/jetty/webapp/webdefault.xml";
public final static String ERROR_PAGE="org.eclipse.jetty.server.error_page";
@@ -94,16 +95,16 @@ public class WebAppContext extends ServletContextHandler
"org.w3c.",
"org.apache.commons.logging.",
"org.apache.log4j.",
- "org.eclipse.jetty.servlet.", // webapp cannot change default servlets
- "org.eclipse.util.ajax.", // webapp cannot change continuation classes
- "org.eclipse.naming." // webapp cannot change naming classes
+ "org.eclipse.jetty.servlet.", // webapp cannot change default servlets
+ "org.eclipse.jetty.continuation.", // webapp cannot change continuation classes
+ "org.eclipse.jetty.naming." // webapp cannot change naming classes
};
private String[] _serverClasses = {
- "-org.eclipse.naming.", // don't hide naming classes
- "-org.eclipse.util.ajax.", // don't hide continuation classes
- "-org.eclipse.jetty.plus.jaas.", //don't hide jaas modules
- "org.eclipse.", // hide rest of eclipse classes
- "org.slf4j." // hide slf4j
+ "-org.eclipse.jetty.naming.", // don't hide naming classes
+ "-org.eclipse.jetty.continuation.", // don't hide continuation classes
+ "-org.eclipse.jetty.plus.jaas.", // don't hide jaas modules
+ "org.eclipse.jetty.", // hide rest of jetty classes
+ "org.slf4j." // hide slf4j
};
private File _tmpDir;
private boolean _isExistingTmpDir;
@@ -602,7 +603,7 @@ public class WebAppContext extends ServletContextHandler
//
// I'm afraid that this is very much black magic.
// but if you can think of better....
- Object t = getAttribute(ServletContext.TEMPDIR);
+ Object t = getAttribute(TEMPDIR);
if (t!=null && (t instanceof File))
{
@@ -620,7 +621,7 @@ public class WebAppContext extends ServletContextHandler
if (_tmpDir.isDirectory() && _tmpDir.canWrite())
{
if(Log.isDebugEnabled())Log.debug("Converted to File "+_tmpDir+" for "+this);
- setAttribute(ServletContext.TEMPDIR,_tmpDir);
+ setAttribute(TEMPDIR,_tmpDir);
return _tmpDir;
}
}
@@ -715,7 +716,7 @@ public class WebAppContext extends ServletContextHandler
}
}
- setAttribute(ServletContext.TEMPDIR,_tmpDir);
+ setAttribute(TEMPDIR,_tmpDir);
return _tmpDir;
}
@@ -1134,7 +1135,7 @@ public class WebAppContext extends ServletContextHandler
throw new IllegalArgumentException("Bad temp directory: "+dir);
_tmpDir=dir;
- setAttribute(ServletContext.TEMPDIR,_tmpDir);
+ setAttribute(TEMPDIR,_tmpDir);
}
/* ------------------------------------------------------------ */
@@ -1203,8 +1204,8 @@ public class WebAppContext extends ServletContextHandler
&& work.isDirectory()
&& work.getFile() != null
&& work.getFile().canWrite()
- && getAttribute(ServletContext.TEMPDIR) == null)
- setAttribute(ServletContext.TEMPDIR, work.getFile());
+ && getAttribute(TEMPDIR) == null)
+ setAttribute(TEMPDIR, work.getFile());
}
// Configure webapp

Back to the top