kinman 2002/11/04 13:13:40
Modified: jasper2/src/share/org/apache/jasper/compiler Generator.java
jasper2/src/share/org/apache/jasper/runtime HttpJspBase.java
PageContextImpl.java
Log:
- Fix 14197: allow jspDestroy to be overrided.
Revision Changes Path
1.118 +8 -5
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
Index: Generator.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- Generator.java 2 Nov 2002 00:27:45 -0000 1.117
+++ Generator.java 4 Nov 2002 21:13:39 -0000 1.118
@@ -313,11 +313,14 @@
}
/**
- * Generates the destroy() method which is responsible for calling the
+ * Generates the _jspDestroy() method which is responsible for calling the
* release() method on every tag handler in any of the tag handler pools.
*/
private void generateDestroy() {
- out.printil("public void jspDestroy() {");
+ if (tagHandlerPoolNames.size() <= 0)
+ return;
+
+ out.printil("public void _jspDestroy() {");
out.pushIndent();
for (int i=0; i<tagHandlerPoolNames.size(); i++) {
out.printin((String) tagHandlerPoolNames.elementAt(i));
1.6 +4 -0
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/HttpJspBase.java
Index: HttpJspBase.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/HttpJspBase.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- HttpJspBase.java 21 Oct 2002 22:50:05 -0000 1.5
+++ HttpJspBase.java 4 Nov 2002 21:13:39 -0000 1.6
@@ -124,6 +124,7 @@
public final void destroy() {
jspDestroy();
+ _jspDestroy();
}
/**
@@ -139,6 +140,9 @@
}
public void jspDestroy() {
+ }
+
+ protected void _jspDestroy() {
}
public abstract void _jspService(HttpServletRequest request,
1.29 +5 -5
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java
Index: PageContextImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- PageContextImpl.java 29 Oct 2002 00:53:02 -0000 1.28
+++ PageContextImpl.java 4 Nov 2002 21:13:39 -0000 1.29
@@ -210,11 +210,11 @@
// push it into the including jspWriter
} else {
// Old code:
- //out.flush();
+ out.flush();
// Do not flush the buffer even if we're not included (i.e.
// we are the main page. The servlet will flush it and close
// the stream.
- ((JspWriterImpl)out).flushBuffer();
+ //((JspWriterImpl)out).flushBuffer();
}
} catch (IOException ex) {
loghelper.log("Internal error flushing the buffer in release()");
--
To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>