remm 01/10/04 12:27:36
Modified: catalina/src/share/org/apache/catalina/core Tag:
tomcat_40_branch StandardContext.java
StandardWrapper.java
Log:
- Merge a variety of fixes and small feature additions which have been made
and debugged in the HEAD branch, including:
- Removal of Jasper loader (merged with the shared loader).
- Fixes a lot of spec complaince issue regarding the commit state of the
response when using forwards, sendError or sendRedirect.
- Fixes cache consistency issues for static resource serving.
- Adds content caching for static resources (that's linked to the bugfix
mentioned just above).
- Merge enhanced error reporting and error page dispatching (which will be
able to display error pages for most errors returned from the pipeline -
like the 401 and 403 returned by the authenticator).
- Merge the fixes for all the other more recent bugfixes that have been
fixed in the HEAD branch.
- Passes all tester and Watchdog tests.
- Merge a variety of small enhancements to the build scripts which have been
made in the HEAD branch.
Revision Changes Path
No revision
No revision
1.78.2.3 +4 -65
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java
Index: StandardContext.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
retrieving revision 1.78.2.2
retrieving revision 1.78.2.3
diff -u -r1.78.2.2 -r1.78.2.3
--- StandardContext.java 2001/09/26 23:17:52 1.78.2.2
+++ StandardContext.java 2001/10/04 19:27:36 1.78.2.3
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
1.78.2.2 2001/09/26 23:17:52 remm Exp $
- * $Revision: 1.78.2.2 $
- * $Date: 2001/09/26 23:17:52 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
1.78.2.3 2001/10/04 19:27:36 remm Exp $
+ * $Revision: 1.78.2.3 $
+ * $Date: 2001/10/04 19:27:36 $
*
* ====================================================================
*
@@ -142,7 +142,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
- * @version $Revision: 1.78.2.2 $ $Date: 2001/09/26 23:17:52 $
+ * @version $Revision: 1.78.2.3 $ $Date: 2001/10/04 19:27:36 $
*/
public class StandardContext
@@ -311,14 +311,6 @@
/**
- * The special class loader created for Jasper in order to isolate
- * its use of an XML parser from the libraries made visible to
- * web applications.
- */
- private ClassLoader jasperLoader = null;
-
-
- /**
* The local EJB resource references for this web application, keyed by
* name.
*/
@@ -815,7 +807,6 @@
public synchronized void setLoader(Loader loader) {
super.setLoader(loader);
- jasperLoader = null;
}
@@ -1124,52 +1115,6 @@
/**
- * Return the special class loader for Jasper for this web application,
- * creating one if required.
- */
- public synchronized ClassLoader getJasperLoader() {
-
- // Return the existing class loader (if any)
- if (jasperLoader != null) {
- return (jasperLoader);
- }
-
- // Can we set up the corresponding Jasper class loader?
- if (loader == null) {
- return (null);
- }
- ClassLoader classLoader = loader.getClassLoader();
- if (classLoader == null) {
- return (null);
- }
-
- // Set up the Jasper class loader
- StandardClassLoader newLoader = new StandardClassLoader(classLoader);
- newLoader.setDelegate(true);
- File directory = new File(System.getProperty("catalina.home"),
- "jasper");
- if (directory.exists() && directory.canRead() &&
- directory.isDirectory()) {
- String filenames[] = directory.list();
- for (int i = 0; i < filenames.length; i++) {
- if (!filenames[i].endsWith(".jar"))
- continue;
- File file = new File(directory, filenames[i]);
- try {
- URL url = new URL("file", null, file.getCanonicalPath());
- newLoader.addRepository(url.toString());
- } catch (IOException e) {
- throw new IllegalArgumentException(e.toString());
- }
- }
- }
- jasperLoader = newLoader;
- return (jasperLoader);
-
- }
-
-
- /**
* Return the default Mapper class name.
*/
public String getMapperClass() {
@@ -2430,9 +2375,6 @@
// Binding thread
unbindThread(oldCCL);
- // Dump the old Jasper loader
- jasperLoader = null;
-
// Shut down our application class loader
if ((loader != null) && (loader instanceof Lifecycle)) {
try {
@@ -3460,9 +3402,6 @@
// Unbinding thread
unbindThread(oldCCL);
-
- // Dump the old Jasper loader
- jasperLoader = null;
if (debug >= 1)
log("Stopping complete");
1.29.2.1 +4 -17
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
Index: StandardWrapper.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
retrieving revision 1.29
retrieving revision 1.29.2.1
diff -u -r1.29 -r1.29.2.1
--- StandardWrapper.java 2001/08/23 16:42:26 1.29
+++ StandardWrapper.java 2001/10/04 19:27:36 1.29.2.1
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
1.29 2001/08/23 16:42:26 craigmcc Exp $
- * $Revision: 1.29 $
- * $Date: 2001/08/23 16:42:26 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
1.29.2.1 2001/10/04 19:27:36 remm Exp $
+ * $Revision: 1.29.2.1 $
+ * $Date: 2001/10/04 19:27:36 $
*
* ====================================================================
*
@@ -105,7 +105,7 @@
* make them efficient are counter-productive.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.29 $ $Date: 2001/08/23 16:42:26 $
+ * @version $Revision: 1.29.2.1 $ $Date: 2001/10/04 19:27:36 $
*/
public final class StandardWrapper
@@ -185,12 +185,6 @@
/**
- * The specialized class loader for the Jasper JSP servlet.
- */
- private ClassLoader jasperLoader = null;
-
-
- /**
* The context-relative URI of the JSP file for this servlet.
*/
private String jspFile = null;
@@ -800,12 +794,6 @@
("standardWrapper.containerServlet", getName()));
}
- // Special case class loader for the Jasper JSP servlet
- if (actualClass.equals(Constants.JSP_SERVLET_CLASS)) {
- classLoader = ((StandardContext) getParent()).getJasperLoader();
- log(sm.getString("standardWrapper.jasperLoader", getName()));
- }
-
// Load the specified servlet class from the appropriate class loader
Class classClass = null;
try {
@@ -1031,7 +1019,6 @@
// Deregister the destroyed instance
instance = null;
- jasperLoader = null;
unloading = false;
fireContainerEvent("unload", this);