You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/09/21 10:54:33 UTC
[tomcat] branch 10.0.x updated: Fix BZ 66203. Log error message when JSP output dir can't be created
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push:
new 731d5d0d1d Fix BZ 66203. Log error message when JSP output dir can't be created
731d5d0d1d is described below
commit 731d5d0d1d38265fb9a00b9329cd30d3c38797f1
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Sep 21 11:48:28 2022 +0100
Fix BZ 66203. Log error message when JSP output dir can't be created
https://bz.apache.org/bugzilla/show_bug.cgi?id=66203
---
java/org/apache/jasper/JspCompilationContext.java | 4 ++--
java/org/apache/jasper/resources/LocalStrings.properties | 3 ++-
webapps/docs/changelog.xml | 8 ++++++++
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/jasper/JspCompilationContext.java b/java/org/apache/jasper/JspCompilationContext.java
index 69a61b4477..69381ac7c6 100644
--- a/java/org/apache/jasper/JspCompilationContext.java
+++ b/java/org/apache/jasper/JspCompilationContext.java
@@ -689,9 +689,9 @@ public class JspCompilationContext {
try {
File base = options.getScratchDir();
baseUrl = base.toURI().toURL();
- outputDir = base.getAbsolutePath() + File.separator + path +
- File.separator;
+ outputDir = base.getAbsolutePath() + File.separator + path + File.separator;
if (!makeOutputDir()) {
+ log.error(Localizer.getMessage("jsp.error.outputfolder.detail", outputDir));
throw new IllegalStateException(Localizer.getMessage("jsp.error.outputfolder"));
}
} catch (MalformedURLException e) {
diff --git a/java/org/apache/jasper/resources/LocalStrings.properties b/java/org/apache/jasper/resources/LocalStrings.properties
index 7f5c904921..a8647fd878 100644
--- a/java/org/apache/jasper/resources/LocalStrings.properties
+++ b/java/org/apache/jasper/resources/LocalStrings.properties
@@ -138,7 +138,8 @@ jsp.error.noInstanceManager=No org.apache.tomcat.InstanceManager set in ServletC
jsp.error.non_null_tei_and_var_subelems=Tag [{0}] has one or more variable subelements and a TagExtraInfo class that returns one or more VariableInfo
jsp.error.not.in.template=[{0}] not allowed in a template text body.
jsp.error.nullArgument=Null argument
-jsp.error.outputfolder=No output folder
+jsp.error.outputfolder=No output directory
+jsp.error.outputfolder.detail=Unable to create output directory [{0}] required for JSP compilation
jsp.error.overflow=Error: JSP Buffer overflow
jsp.error.page.conflict.autoflush=Page directive: illegal to have multiple occurrences of ''autoFlush'' with different values (old: [{0}], new: [{1}])
jsp.error.page.conflict.buffer=Page directive: illegal to have multiple occurrences of ''buffer'' with different values (old: [{0}], new: [{1}])
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b50bb51e70..d837b33d4e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
issues do not "pop up" wrt. others).
-->
<section name="Tomcat 10.0.25 (markt)" rtext="in development">
+ <subsection name="Jasper">
+ <changelog>
+ <add>
+ <bug>66203</bug>: Log an error message when the JSP compiler is unable
+ to create the output directory for the generated code. (markt)
+ </add>
+ </changelog>
+ </subsection>
<subsection name="Other">
<changelog>
<update>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org