yoavs 2005/07/21 14:23:48
Modified: webapps/docs changelog.xml
jasper2/src/share/org/apache/jasper JspC.java
Log:
Bugzilla 35114: http://issues.apache.org/bugzilla/show_bug.cgi?id=35114
Revision Changes Path
1.329 +6 -3 jakarta-tomcat-catalina/webapps/docs/changelog.xml
Index: changelog.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
retrieving revision 1.328
retrieving revision 1.329
diff -u -r1.328 -r1.329
--- changelog.xml 21 Jul 2005 21:11:39 -0000 1.328
+++ changelog.xml 21 Jul 2005 21:23:47 -0000 1.329
@@ -45,9 +45,6 @@
Change log dir at service.bat to "$CATALINA_BASE/logs" for better
multi instance support. (pero)
</update>
<update>
- <bug>33522</bug>: Update jasper-howto to reflect use of javac
switch. (yoavs)
- </update>
- <update>
<bug>34237</bug>: Added note and links to context and host
configuration
references in JNDI DataSources HowTo to aid the clueless. (yoavs)
</update>
@@ -255,6 +252,12 @@
<fix>
<bug>35386</bug>: Make useBean resources use consistent spelling,
from Kurt Huwig. (yoavs)
</fix>
+ <update>
+ <bug>33522</bug>: Update jasper-howto to reflect use of javac
switch. (yoavs)
+ </update>
+ <add>
+ <bug>35114</bug>: Add failOnError flag to JspC, by ziweth. (yoavs)
+ </add>
</changelog>
</subsection>
1.97 +24 -1
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java
Index: JspC.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- JspC.java 29 Apr 2005 17:18:22 -0000 1.96
+++ JspC.java 21 Jul 2005 21:23:48 -0000 1.97
@@ -160,6 +160,12 @@
private boolean classDebugInfo = true;
/**
+ * Throw an exception if there's a compilation error, or swallow it.
+ * Default is true to preserve old behavior.
+ */
+ private boolean failOnError = true;
+
+ /**
* The file extensions to be handled as JSP files.
* Default list is .jsp and .jspx.
*/
@@ -688,6 +694,17 @@
}
/**
+ * Set the option that throws an exception in case of a compilation
error.
+ */
+ public void setFailOnError(final boolean b) {
+ failOnError = b;
+ }
+
+ public boolean getFailOnError() {
+ return failOnError;
+ }
+
+ /**
* Obtain JSP configuration informantion specified in web.xml.
*/
public JspConfig getJspConfig() {
@@ -897,7 +914,13 @@
file),
rootCause);
}
- throw je;
+
+ // Bugzilla 35114.
+ if(getFailOnError()) {
+ throw je;
+ } else {
+ log.error(je.getMessage());
+ }
} catch (Exception e) {
if ((e instanceof FileNotFoundException) && log.isWarnEnabled())
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]