Author: markt
Date: Tue Aug 16 12:47:16 2011
New Revision: 1158242
URL: http://svn.apache.org/viewvc?rev=1158242&view=rev
Log:
Fix possible threading issue in JSP compilation when development mode is enabled
Modified:
tomcat/tc5.5.x/trunk/STATUS.txt
tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/servlet/JspServletWrapper.java
Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1158242&r1=1158241&r2=1158242&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Tue Aug 16 12:47:16 2011
@@ -31,12 +31,6 @@ PATCHES PROPOSED TO BACKPORT:
+1: kkolinko, markt
-1:
-* Fix possible threading issue in JSP compilation when development mode is
- enabled
- http://svn.apache.org/viewvc?rev=1078409&view=rev
- +1: markt, kfujino, kkolinko
- -1:
-
* Add additional configuration options to the DIGEST authenticator
http://people.apache.org/~markt/patches/2011-04-01-digest-tc5.patch
+1: markt
Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml?rev=1158242&r1=1158241&r2=1158242&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml (original)
+++ tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Tue Aug 16
12:47:16 2011
@@ -83,6 +83,10 @@
use any valid XML name) have a name which is not a Java identifier.
(markt)
</fix>
+ <fix>
+ Fix possible threading issue in JSP compilation when development mode
is
+ enabled. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Cluster">
Modified:
tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/servlet/JspServletWrapper.java
URL:
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/servlet/JspServletWrapper.java?rev=1158242&r1=1158241&r2=1158242&view=diff
==============================================================================
---
tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/servlet/JspServletWrapper.java
(original)
+++
tomcat/tc5.5.x/trunk/jasper/src/share/org/apache/jasper/servlet/JspServletWrapper.java
Tue Aug 16 12:47:16 2011
@@ -279,6 +279,8 @@ public class JspServletWrapper {
boolean precompile)
throws ServletException, IOException, FileNotFoundException {
+ Servlet servlet;
+
try {
if (ctxt.isRemoved()) {
@@ -318,7 +320,7 @@ public class JspServletWrapper {
/*
* (2) (Re)load servlet class file
*/
- getServlet();
+ servlet = getServlet();
// If a page is to be precompiled only, return.
if (precompile) {
@@ -359,14 +361,14 @@ public class JspServletWrapper {
/*
* (3) 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) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]