Remove unused isErrPage attribute
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 19 May 2011 12:45:49 +0000 (12:45 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 19 May 2011 12:45:49 +0000 (12:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1124719 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/JspC.java
java/org/apache/jasper/JspCompilationContext.java
java/org/apache/jasper/servlet/JspServlet.java
java/org/apache/jasper/servlet/JspServletWrapper.java

index bf08865..3d4c08c 100644 (file)
@@ -1160,7 +1160,7 @@ public class JspC implements Options {
 
             String jspUri=file.replace('\\','/');
             JspCompilationContext clctxt = new JspCompilationContext
-                ( jspUri, false,  this, context, null, rctxt );
+                ( jspUri, this, context, null, rctxt );
 
             /* Override the defaults */
             if ((targetClassName != null) && (targetClassName.length() > 0)) {
index 7558359..274db10 100644 (file)
@@ -63,7 +63,6 @@ public class JspCompilationContext {
 
     protected String className;
     protected String jspUri;
-    protected boolean isErrPage;
     protected String basePackageName;
     protected String derivedPackageName;
     protected String servletJavaFileName;
@@ -95,14 +94,12 @@ public class JspCompilationContext {
 
     // jspURI _must_ be relative to the context
     public JspCompilationContext(String jspUri,
-                                 boolean isErrPage,
                                  Options options,
                                  ServletContext context,
                                  JspServletWrapper jsw,
                                  JspRuntimeContext rctxt) {
 
         this.jspUri = canonicalURI(jspUri);
-        this.isErrPage = isErrPage;
         this.options = options;
         this.jsw = jsw;
         this.context = context;
@@ -132,7 +129,7 @@ public class JspCompilationContext {
                                  JspServletWrapper jsw,
                                  JspRuntimeContext rctxt,
                                  JarResource tagJarResource) {
-        this(tagfile, false, options, context, jsw, rctxt);
+        this(tagfile, options, context, jsw, rctxt);
         this.isTagFile = true;
         this.tagInfo = tagInfo;
         this.tagJarResource = tagJarResource;
@@ -385,18 +382,6 @@ public class JspCompilationContext {
         return jspUri;
     }
 
-    /**
-     * Are we processing something that has been declared as an
-     * errorpage? 
-     */
-    public boolean isErrorPage() {
-        return isErrPage;
-    }
-
-    public void setErrorPage(boolean isErrPage) {
-        this.isErrPage = isErrPage;
-    }
-
     public boolean isTagFile() {
         return isTagFile;
     }
index c72d114..e6b451e 100644 (file)
@@ -129,12 +129,12 @@ public class JspServlet extends HttpServlet implements PeriodicEventListener {
                    AccessController.doPrivileged(new PrivilegedExceptionAction<Object>(){
                         @Override
                         public Object run() throws IOException, ServletException {
-                            serviceJspFile(null, null, jspFile, null, true);
+                            serviceJspFile(null, null, jspFile, true);
                             return null;
                         }
                     });
                 } else {
-                    serviceJspFile(null, null, jspFile, null, true);
+                    serviceJspFile(null, null, jspFile, true);
                 }
             } catch (IOException e) {
                 throw new ServletException("Could not precompile jsp: " + jspFile, e);
@@ -330,7 +330,7 @@ public class JspServlet extends HttpServlet implements PeriodicEventListener {
 
         try {
             boolean precompile = preCompile(request);
-            serviceJspFile(request, response, jspUri, null, precompile);
+            serviceJspFile(request, response, jspUri, precompile);
         } catch (RuntimeException e) {
             throw e;
         } catch (ServletException e) {
@@ -364,7 +364,7 @@ public class JspServlet extends HttpServlet implements PeriodicEventListener {
 
     private void serviceJspFile(HttpServletRequest request,
                                 HttpServletResponse response, String jspUri,
-                                Throwable exception, boolean precompile)
+                                boolean precompile)
         throws ServletException, IOException {
 
         JspServletWrapper wrapper = rctxt.getWrapper(jspUri);
@@ -378,9 +378,8 @@ public class JspServlet extends HttpServlet implements PeriodicEventListener {
                         handleMissingResource(request, response, jspUri);
                         return;
                     }
-                    boolean isErrorPage = exception != null;
                     wrapper = new JspServletWrapper(config, options, jspUri,
-                                                    isErrorPage, rctxt);
+                                                    rctxt);
                     rctxt.addWrapper(jspUri,wrapper);
                 }
             }
index 5061c40..a7d23be 100644 (file)
@@ -97,8 +97,8 @@ public class JspServletWrapper {
     /*
      * JspServletWrapper for JSP pages.
      */
-    public JspServletWrapper(ServletConfig config, Options options, String jspUri,
-                      boolean isErrorPage, JspRuntimeContext rctxt) {
+    public JspServletWrapper(ServletConfig config, Options options,
+            String jspUri, JspRuntimeContext rctxt) {
 
         this.isTagFile = false;
         this.config = config;
@@ -107,7 +107,7 @@ public class JspServletWrapper {
         unloadByCount = options.getMaxLoadedJsps() > 0 ? true : false;
         unloadByIdle = options.getJspIdleTimeout() > 0 ? true : false;
         unloadAllowed = unloadByCount || unloadByIdle ? true : false;
-        ctxt = new JspCompilationContext(jspUri, isErrorPage, options,
+        ctxt = new JspCompilationContext(jspUri, options,
                                          config.getServletContext(),
                                          this, rctxt);
     }