Fix threading issue reported on dev list
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 6 Mar 2011 07:17:07 +0000 (07:17 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 6 Mar 2011 07:17:07 +0000 (07:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1078409 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/servlet/JspServletWrapper.java
webapps/docs/changelog.xml

index f69221c..5061c40 100644 (file)
@@ -312,6 +312,8 @@ public class JspServletWrapper {
                         boolean precompile)
             throws ServletException, IOException, FileNotFoundException {
         
+        Servlet servlet;
+
         try {
 
             if (ctxt.isRemoved()) {
@@ -351,7 +353,7 @@ public class JspServletWrapper {
             /*
              * (2) (Re)load servlet class file
              */
-            getServlet();
+            servlet = getServlet();
 
             // If a page is to be precompiled only, return.
             if (precompile) {
@@ -407,14 +409,14 @@ public class JspServletWrapper {
             /*
              * (4) Service request
              */
-            if (theServlet instanceof SingleThreadModel) {
+            if (servlet instanceof SingleThreadModel) {
                // sync on the wrapper so that the freshness
                // of the page is determined right before servicing
                synchronized (this) {
-                   theServlet.service(request, response);
+                   servlet.service(request, response);
                 }
             } else {
-                theServlet.service(request, response);
+                servlet.service(request, response);
             }
         } catch (UnavailableException ex) {
             String includeRequestUri = (String)
index f3b5821..05e1761 100644 (file)
   General, Catalina, Coyote, Jasper, Cluster, Web applications, Extras, Tribes,
   Other
 -->
+<section name="Tomcat 7.0.11 (markt)">
+  <subsection name="Jasper">
+    <changelog>
+      <fix>
+        Correct possible threading issue in JSP compilation when development
+        mode is used. (markt)
+      </fix>
+    </changelog>
+  </subsection>
+</section>
 <section name="Tomcat 7.0.10 (markt)">
   <subsection name="Catalina">
     <changelog>