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:55:57 UTC
[tomcat] branch 8.5.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 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new d583cdc4b8 Fix BZ 66203. Log error message when JSP output dir can't be created
d583cdc4b8 is described below
commit d583cdc4b8039f6b41c97f9c420e0e27d119abc3
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 | 4 ++++
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/jasper/JspCompilationContext.java b/java/org/apache/jasper/JspCompilationContext.java
index cb38a074ae..af24dcfa80 100644
--- a/java/org/apache/jasper/JspCompilationContext.java
+++ b/java/org/apache/jasper/JspCompilationContext.java
@@ -683,9 +683,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 f25def53fe..16ff3d7b76 100644
--- a/java/org/apache/jasper/resources/LocalStrings.properties
+++ b/java/org/apache/jasper/resources/LocalStrings.properties
@@ -135,7 +135,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 ef629919b7..493eb7c78f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -195,6 +195,10 @@
so that larger values are correctly parsed to <code>BigInteger</code>
and <code>BigDecimal</code> respectively. (markt)
</fix>
+ <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>
<fix>
Improve the performance of the <code>ImportHandler</code> in the
Expression Language implementation. This removes a previous optimisation
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org