[tomcat] branch main updated: Add version number

2021-09-23 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new ca11d56  Add version number
ca11d56 is described below

commit ca11d5650cafd197190e950d0e05e8ddf87482dd
Author: remm 
AuthorDate: Thu Sep 23 11:01:27 2021 +0200

Add version number
---
 java/org/apache/tomcat/util/descriptor/web/WebXml.java | 4 
 1 file changed, 4 insertions(+)

diff --git a/java/org/apache/tomcat/util/descriptor/web/WebXml.java 
b/java/org/apache/tomcat/util/descriptor/web/WebXml.java
index 4708f7c..8cba46f 100644
--- a/java/org/apache/tomcat/util/descriptor/web/WebXml.java
+++ b/java/org/apache/tomcat/util/descriptor/web/WebXml.java
@@ -186,6 +186,10 @@ public class WebXml extends XmlEncodingBase implements 
DocumentProperties.Charse
 majorVersion = 5;
 minorVersion = 0;
 break;
+case "6.0":
+majorVersion = 6;
+minorVersion = 0;
+break;
 default:
 log.warn(sm.getString("webXml.version.unknown", version));
 }

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Add default implementation to align with EL spec changes

2021-09-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 731  Add default implementation to align with EL spec changes
731 is described below

commit 73102cb15eb9dd5feba25dd463fd9219272c
Author: Mark Thomas 
AuthorDate: Thu Sep 23 11:00:38 2021 +0100

Add default implementation to align with EL spec changes
---
 java/jakarta/el/ELResolver.java | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/jakarta/el/ELResolver.java b/java/jakarta/el/ELResolver.java
index e3e387d..8846c02 100644
--- a/java/jakarta/el/ELResolver.java
+++ b/java/jakarta/el/ELResolver.java
@@ -121,6 +121,8 @@ public abstract class ELResolver {
 /**
  * Obtain the feature descriptors for the resolvable properties of the 
given
  * object.
+ * 
+ * The default implementation returns {@code null}.
  *
  * @param context The context in which the examination takes place
  * @param base The object to examine
@@ -132,7 +134,9 @@ public abstract class ELResolver {
  * Tomcat 11.
  */
 @Deprecated(forRemoval = true, since = "EL 5.0")
-public abstract Iterator 
getFeatureDescriptors(ELContext context, Object base);
+public Iterator 
getFeatureDescriptors(ELContext context, Object base) {
+return null;
+}
 
 /**
  * Obtain the most common type that is acceptable for the given base 
object.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Schema update. Remove same-site attribute added in error

2021-09-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 5937fdd  Schema update. Remove same-site attribute added in error
5937fdd is described below

commit 5937fddb074a65df202b2aa0b274018c84e2e016
Author: Mark Thomas 
AuthorDate: Thu Sep 23 14:46:01 2021 +0100

Schema update. Remove same-site attribute added in error

A generic attribute API was added that needs to be replicated into
web.xml
---
 java/jakarta/servlet/resources/web-common_6_0.xsd | 37 ---
 1 file changed, 37 deletions(-)

diff --git a/java/jakarta/servlet/resources/web-common_6_0.xsd 
b/java/jakarta/servlet/resources/web-common_6_0.xsd
index 4d2b152..c0e3dd8 100644
--- a/java/jakarta/servlet/resources/web-common_6_0.xsd
+++ b/java/jakarta/servlet/resources/web-common_6_0.xsd
@@ -955,19 +955,6 @@
   
 
   
-  
-
-  
-
-Specifies whether any session tracking cookies created
-by this web application will be marked with a Same-Site
-attribute
-
-  
-
-  
   
@@ -1083,30 +1070,6 @@
 
 
 
-  
-
-  
-
-This type defines the values for the Same-Site cookie
-attribute as defined by
-
https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7
-
-Used in: cookie-config
-
-  
-
-
-  
-
-
-
-  
-
-  
-
-
-
-
   
 
   

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Schema update. New JSP property group sub-element.

2021-09-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 7eedc51  Schema update. New JSP property group sub-element.
7eedc51 is described below

commit 7eedc518666ed754351c814b806a306a43a38e51
Author: Mark Thomas 
AuthorDate: Thu Sep 23 14:46:33 2021 +0100

Schema update. New JSP property group sub-element.
---
 java/jakarta/servlet/resources/jsp_3_1.xsd | 13 +
 1 file changed, 13 insertions(+)

diff --git a/java/jakarta/servlet/resources/jsp_3_1.xsd 
b/java/jakarta/servlet/resources/jsp_3_1.xsd
index ad9fe71..4e896ca 100644
--- a/java/jakarta/servlet/resources/jsp_3_1.xsd
+++ b/java/jakarta/servlet/resources/jsp_3_1.xsd
@@ -152,6 +152,19 @@
   
 
   
+  
+
+  
+
+Can be used to easily set the errorOnELNotFound
+property of a group of JSP pages. By default, this
+property is false.
+
+  
+
+  
   

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix typo

2021-09-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 9001eb6  Fix typo
9001eb6 is described below

commit 9001eb630d3596f9047a6671d5a046bd29ca4b2e
Author: Mark Thomas 
AuthorDate: Thu Sep 23 18:30:59 2021 +0100

Fix typo
---
 java/jakarta/servlet/jsp/PageContext.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/jakarta/servlet/jsp/PageContext.java 
b/java/jakarta/servlet/jsp/PageContext.java
index 49267f6..619b64e 100644
--- a/java/jakarta/servlet/jsp/PageContext.java
+++ b/java/jakarta/servlet/jsp/PageContext.java
@@ -201,7 +201,7 @@ public abstract class PageContext
  * the "out" name in page scope with this newly created object.
  *
  * 
- * This method should not be used by page  or tag library authors.
+ * This method should not be used by page or tag library authors.
  *
  * @param servlet The Servlet that is associated with this PageContext
  * @param request The currently pending request for this Servlet

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.0.x updated: Fix typo

2021-09-23 Thread markt
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 7c4f956  Fix typo
7c4f956 is described below

commit 7c4f9564be63f2b7114748ddcb30684d7d6db37d
Author: Mark Thomas 
AuthorDate: Thu Sep 23 18:30:59 2021 +0100

Fix typo
---
 java/jakarta/servlet/jsp/PageContext.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/jakarta/servlet/jsp/PageContext.java 
b/java/jakarta/servlet/jsp/PageContext.java
index 49267f6..619b64e 100644
--- a/java/jakarta/servlet/jsp/PageContext.java
+++ b/java/jakarta/servlet/jsp/PageContext.java
@@ -201,7 +201,7 @@ public abstract class PageContext
  * the "out" name in page scope with this newly created object.
  *
  * 
- * This method should not be used by page  or tag library authors.
+ * This method should not be used by page or tag library authors.
  *
  * @param servlet The Servlet that is associated with this PageContext
  * @param request The currently pending request for this Servlet

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Fix typo

2021-09-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 96c3f84  Fix typo
96c3f84 is described below

commit 96c3f84a9cdece0013e7bfc535ced353f8c0ba5b
Author: Mark Thomas 
AuthorDate: Thu Sep 23 18:30:59 2021 +0100

Fix typo
---
 java/javax/servlet/jsp/PageContext.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/javax/servlet/jsp/PageContext.java 
b/java/javax/servlet/jsp/PageContext.java
index 9a7a6af..6c8284e 100644
--- a/java/javax/servlet/jsp/PageContext.java
+++ b/java/javax/servlet/jsp/PageContext.java
@@ -201,7 +201,7 @@ public abstract class PageContext
  * the "out" name in page scope with this newly created object.
  *
  * 
- * This method should not be used by page  or tag library authors.
+ * This method should not be used by page or tag library authors.
  *
  * @param servlet The Servlet that is associated with this PageContext
  * @param request The currently pending request for this Servlet

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix typo

2021-09-23 Thread markt
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 320880d  Fix typo
320880d is described below

commit 320880d7cfa9b798aa38c27df5fdd0053d3da7e0
Author: Mark Thomas 
AuthorDate: Thu Sep 23 18:30:59 2021 +0100

Fix typo
---
 java/javax/servlet/jsp/PageContext.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/javax/servlet/jsp/PageContext.java 
b/java/javax/servlet/jsp/PageContext.java
index 9a7a6af..6c8284e 100644
--- a/java/javax/servlet/jsp/PageContext.java
+++ b/java/javax/servlet/jsp/PageContext.java
@@ -201,7 +201,7 @@ public abstract class PageContext
  * the "out" name in page scope with this newly created object.
  *
  * 
- * This method should not be used by page  or tag library authors.
+ * This method should not be used by page or tag library authors.
  *
  * @param servlet The Servlet that is associated with this PageContext
  * @param request The currently pending request for this Servlet

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot failure in on tomcat-10.0.x

2021-09-23 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-10.0.x while building 
tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-10.0.x/builds/165

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-10.0-commit' 
triggered this build
Build Source Stamp: [branch 10.0.x] 7c4f9564be63f2b7114748ddcb30684d7d6db37d
Blamelist: Mark Thomas 

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix incorrect indent

2021-09-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 5d47c04  Fix incorrect indent
5d47c04 is described below

commit 5d47c040a6e1d146babd89a5dc02beb3505330b8
Author: Mark Thomas 
AuthorDate: Thu Sep 23 19:56:13 2021 +0100

Fix incorrect indent
---
 java/org/apache/jasper/compiler/JspConfig.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/JspConfig.java 
b/java/org/apache/jasper/compiler/JspConfig.java
index 1218bde..f63109a 100644
--- a/java/org/apache/jasper/compiler/JspConfig.java
+++ b/java/org/apache/jasper/compiler/JspConfig.java
@@ -329,8 +329,7 @@ public class JspConfig {
 String isELIgnored = defaultIsELIgnored;
 String isScriptingInvalid = defaultIsScriptingInvalid;
 String pageEncoding = null;
-String isDeferedSyntaxAllowedAsLiteral =
-defaultDeferedSyntaxAllowedAsLiteral;
+String isDeferedSyntaxAllowedAsLiteral = 
defaultDeferedSyntaxAllowedAsLiteral;
 String isTrimDirectiveWhitespaces = defaultTrimDirectiveWhitespaces;
 String defaultContentType = defaultDefaultContentType;
 String buffer = defaultBuffer;

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.0.x updated: Fix incorrect indent

2021-09-23 Thread markt
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 a7550fb  Fix incorrect indent
a7550fb is described below

commit a7550fb13012efa78dcca01a7196015585f5bcc7
Author: Mark Thomas 
AuthorDate: Thu Sep 23 19:56:13 2021 +0100

Fix incorrect indent
---
 java/org/apache/jasper/compiler/JspConfig.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/JspConfig.java 
b/java/org/apache/jasper/compiler/JspConfig.java
index 1218bde..f63109a 100644
--- a/java/org/apache/jasper/compiler/JspConfig.java
+++ b/java/org/apache/jasper/compiler/JspConfig.java
@@ -329,8 +329,7 @@ public class JspConfig {
 String isELIgnored = defaultIsELIgnored;
 String isScriptingInvalid = defaultIsScriptingInvalid;
 String pageEncoding = null;
-String isDeferedSyntaxAllowedAsLiteral =
-defaultDeferedSyntaxAllowedAsLiteral;
+String isDeferedSyntaxAllowedAsLiteral = 
defaultDeferedSyntaxAllowedAsLiteral;
 String isTrimDirectiveWhitespaces = defaultTrimDirectiveWhitespaces;
 String defaultContentType = defaultDefaultContentType;
 String buffer = defaultBuffer;

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Fix incorrect indent

2021-09-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 0004b62  Fix incorrect indent
0004b62 is described below

commit 0004b628ae9b17873dd0039eb3e84d187178e13d
Author: Mark Thomas 
AuthorDate: Thu Sep 23 19:56:13 2021 +0100

Fix incorrect indent
---
 java/org/apache/jasper/compiler/JspConfig.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/JspConfig.java 
b/java/org/apache/jasper/compiler/JspConfig.java
index 23d3c0d..66155f9 100644
--- a/java/org/apache/jasper/compiler/JspConfig.java
+++ b/java/org/apache/jasper/compiler/JspConfig.java
@@ -329,8 +329,7 @@ public class JspConfig {
 String isELIgnored = defaultIsELIgnored;
 String isScriptingInvalid = defaultIsScriptingInvalid;
 String pageEncoding = null;
-String isDeferedSyntaxAllowedAsLiteral =
-defaultDeferedSyntaxAllowedAsLiteral;
+String isDeferedSyntaxAllowedAsLiteral = 
defaultDeferedSyntaxAllowedAsLiteral;
 String isTrimDirectiveWhitespaces = defaultTrimDirectiveWhitespaces;
 String defaultContentType = defaultDefaultContentType;
 String buffer = defaultBuffer;

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix incorrect indent

2021-09-23 Thread markt
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 f1559b1  Fix incorrect indent
f1559b1 is described below

commit f1559b1037c3865f178f211c377cdc366e2bfc88
Author: Mark Thomas 
AuthorDate: Thu Sep 23 19:56:13 2021 +0100

Fix incorrect indent
---
 java/org/apache/jasper/compiler/JspConfig.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/JspConfig.java 
b/java/org/apache/jasper/compiler/JspConfig.java
index 23d3c0d..66155f9 100644
--- a/java/org/apache/jasper/compiler/JspConfig.java
+++ b/java/org/apache/jasper/compiler/JspConfig.java
@@ -329,8 +329,7 @@ public class JspConfig {
 String isELIgnored = defaultIsELIgnored;
 String isScriptingInvalid = defaultIsScriptingInvalid;
 String pageEncoding = null;
-String isDeferedSyntaxAllowedAsLiteral =
-defaultDeferedSyntaxAllowedAsLiteral;
+String isDeferedSyntaxAllowedAsLiteral = 
defaultDeferedSyntaxAllowedAsLiteral;
 String isTrimDirectiveWhitespaces = defaultTrimDirectiveWhitespaces;
 String defaultContentType = defaultDefaultContentType;
 String buffer = defaultBuffer;

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in on tomcat-10.0.x

2021-09-23 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-10.0.x while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-10.0.x/builds/166

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-10.0-commit' 
triggered this build
Build Source Stamp: [branch 10.0.x] a7550fb13012efa78dcca01a7196015585f5bcc7
Blamelist: Mark Thomas 

Build succeeded!

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 01/03: Servlet API changes required to support errorOnELNotFound

2021-09-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 0d421d66bb229466c3d10b2679fb9784626a8399
Author: Mark Thomas 
AuthorDate: Thu Sep 23 20:09:07 2021 +0100

Servlet API changes required to support errorOnELNotFound
---
 java/jakarta/servlet/descriptor/JspPropertyGroupDescriptor.java | 8 
 1 file changed, 8 insertions(+)

diff --git a/java/jakarta/servlet/descriptor/JspPropertyGroupDescriptor.java 
b/java/jakarta/servlet/descriptor/JspPropertyGroupDescriptor.java
index a1c5356..afa6e8c 100644
--- a/java/jakarta/servlet/descriptor/JspPropertyGroupDescriptor.java
+++ b/java/jakarta/servlet/descriptor/JspPropertyGroupDescriptor.java
@@ -40,6 +40,14 @@ public interface JspPropertyGroupDescriptor {
 public String getElIgnored();
 
 /**
+ * Will the use of an unknown identifier in EL within a JSP page trigger an
+ * error for this group?
+ *
+ * @return {@code true} if an error will be triggered, otherwise {@code 
false}
+ */
+public String getErrorOnELNotFound();
+
+/**
  * Obtain the page encoding for this group.
  *
  * @return the page encoding for this group

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated (5d47c04 -> 37bc60c)

2021-09-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 5d47c04  Fix incorrect indent
 new 0d421d6  Servlet API changes required to support errorOnELNotFound
 new f6d14bb  JSP API updates required to implement errorOnELNotFound
 new 37bc60c  Implement the new page/tag directive errorOnELNotFound

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../descriptor/JspPropertyGroupDescriptor.java |   8 ++
 .../jakarta/servlet/jsp/LocalStrings.properties|   2 +-
 .../jakarta/servlet/jsp/el/NotFoundELResolver.java |  24 +++-
 java/jakarta/servlet/jsp/resources/jspxml.dtd  |  27 ++--
 java/jakarta/servlet/jsp/resources/jspxml.xsd  |   1 +
 java/org/apache/jasper/compiler/Compiler.java  |   4 +
 java/org/apache/jasper/compiler/Generator.java |  15 +++
 java/org/apache/jasper/compiler/JspConfig.java |  21 ++-
 java/org/apache/jasper/compiler/PageInfo.java  |  40 ++
 .../apache/jasper/compiler/TagFileProcessor.java   |   3 +-
 java/org/apache/jasper/compiler/Validator.java |  15 +++
 .../jasper/resources/LocalStrings.properties   |   4 +
 .../apache/jasper/runtime/JspContextWrapper.java   |   9 ++
 .../jasper/runtime/JspSourceDirectives.java}   |  12 +-
 .../org/apache/jasper/runtime/PageContextImpl.java |   6 +
 .../util/descriptor/web/JspPropertyGroup.java  |   6 +
 .../web/JspPropertyGroupDescriptorImpl.java|  12 ++
 .../tomcat/util/descriptor/web/WebRuleSet.java |   2 +
 test/org/apache/jasper/compiler/TestJspConfig.java | 145 +
 .../jasper/servlet/TestJspCServletContext.java |   2 +-
 .../WEB-INF/tags/error-on-el-not-found-false.tag}  |   7 +-
 .../WEB-INF/tags/error-on-el-not-found-true.tag}   |   7 +-
 test/webapp/WEB-INF/web.xml|   8 ++
 .../default.jsp}   |   6 +-
 .../page-directive-false.jsp}  |   7 +-
 .../page-directive-true.jsp}   |   7 +-
 .../jsp/errorOnELNotFound/tag-file-false.jsp}  |   9 +-
 .../jsp/errorOnELNotFound/tag-file-true.jsp}   |   9 +-
 .../web-xml-false.jsp} |   6 +-
 .../web-xml-true.jsp}  |   6 +-
 webapps/docs/changelog.xml |   5 +
 31 files changed, 387 insertions(+), 48 deletions(-)
 copy res/META-INF/jasper-el.jar/services/jakarta.el.ExpressionFactory => 
java/jakarta/servlet/jsp/LocalStrings.properties (95%)
 copy java/{jakarta/el/VariableMapper.java => 
org/apache/jasper/runtime/JspSourceDirectives.java} (74%)
 copy test/{webapp-fragments/bug51396.jsp => 
webapp/WEB-INF/tags/error-on-el-not-found-false.tag} (93%)
 copy test/{webapp-fragments/bug51396.jsp => 
webapp/WEB-INF/tags/error-on-el-not-found-true.tag} (93%)
 copy test/webapp/jsp/{encoding/bom-none-prolog-none.jsp => 
errorOnELNotFound/default.jsp} (92%)
 copy test/webapp/jsp/{encoding/bom-none-prolog-none.jsp => 
errorOnELNotFound/page-directive-false.jsp} (88%)
 copy test/webapp/jsp/{encoding/bom-none-prolog-none.jsp => 
errorOnELNotFound/page-directive-true.jsp} (89%)
 copy test/{deployment/dirContext/index.html => 
webapp/jsp/errorOnELNotFound/tag-file-false.jsp} (84%)
 copy test/{deployment/dirContext/index.html => 
webapp/jsp/errorOnELNotFound/tag-file-true.jsp} (84%)
 copy test/webapp/jsp/{encoding/bom-none-prolog-none.jsp => 
errorOnELNotFound/web-xml-false.jsp} (92%)
 copy test/webapp/jsp/{encoding/bom-none-prolog-none.jsp => 
errorOnELNotFound/web-xml-true.jsp} (92%)

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 03/03: Implement the new page/tag directive errorOnELNotFound

2021-09-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 37bc60c9efed390f662afe0a1d12d2ba0d91ada8
Author: Mark Thomas 
AuthorDate: Thu Sep 23 21:09:52 2021 +0100

Implement the new page/tag directive errorOnELNotFound
---
 java/jakarta/servlet/jsp/resources/jspxml.dtd  |  27 ++--
 java/jakarta/servlet/jsp/resources/jspxml.xsd  |   1 +
 java/org/apache/jasper/compiler/Compiler.java  |   4 +
 java/org/apache/jasper/compiler/Generator.java |  15 +++
 java/org/apache/jasper/compiler/JspConfig.java |  21 ++-
 java/org/apache/jasper/compiler/PageInfo.java  |  40 ++
 .../apache/jasper/compiler/TagFileProcessor.java   |   3 +-
 java/org/apache/jasper/compiler/Validator.java |  15 +++
 .../jasper/resources/LocalStrings.properties   |   4 +
 .../apache/jasper/runtime/JspContextWrapper.java   |   9 ++
 .../apache/jasper/runtime/JspSourceDirectives.java |  27 
 .../org/apache/jasper/runtime/PageContextImpl.java |   6 +
 .../util/descriptor/web/JspPropertyGroup.java  |   6 +
 .../web/JspPropertyGroupDescriptorImpl.java|  12 ++
 .../tomcat/util/descriptor/web/WebRuleSet.java |   2 +
 test/org/apache/jasper/compiler/TestJspConfig.java | 145 +
 .../jasper/servlet/TestJspCServletContext.java |   2 +-
 .../WEB-INF/tags/error-on-el-not-found-false.tag   |  18 +++
 .../WEB-INF/tags/error-on-el-not-found-true.tag|  18 +++
 test/webapp/WEB-INF/web.xml|   8 ++
 test/webapp/jsp/errorOnELNotFound/default.jsp  |  21 +++
 .../jsp/errorOnELNotFound/page-directive-false.jsp |  22 
 .../jsp/errorOnELNotFound/page-directive-true.jsp  |  22 
 .../jsp/errorOnELNotFound/tag-file-false.jsp   |  23 
 .../webapp/jsp/errorOnELNotFound/tag-file-true.jsp |  23 
 .../webapp/jsp/errorOnELNotFound/web-xml-false.jsp |  21 +++
 test/webapp/jsp/errorOnELNotFound/web-xml-true.jsp |  21 +++
 webapps/docs/changelog.xml |   5 +
 28 files changed, 524 insertions(+), 17 deletions(-)

diff --git a/java/jakarta/servlet/jsp/resources/jspxml.dtd 
b/java/jakarta/servlet/jsp/resources/jspxml.dtd
index c6f0998..a5fcc5f 100644
--- a/java/jakarta/servlet/jsp/resources/jspxml.dtd
+++ b/java/jakarta/servlet/jsp/resources/jspxml.dtd
@@ -94,19 +94,20 @@
 
 
 
 
 

[tomcat] 02/03: JSP API updates required to implement errorOnELNotFound

2021-09-23 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit f6d14bbc764c293c409cc4b03eb0737cd594cacb
Author: Mark Thomas 
AuthorDate: Thu Sep 23 21:07:19 2021 +0100

JSP API updates required to implement errorOnELNotFound
---
 java/jakarta/servlet/jsp/LocalStrings.properties   | 16 +++
 .../jakarta/servlet/jsp/el/NotFoundELResolver.java | 24 +-
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/java/jakarta/servlet/jsp/LocalStrings.properties 
b/java/jakarta/servlet/jsp/LocalStrings.properties
new file mode 100644
index 000..2b34d2c
--- /dev/null
+++ b/java/jakarta/servlet/jsp/LocalStrings.properties
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+el.unknown.identifier=Unknown identifier
\ No newline at end of file
diff --git a/java/jakarta/servlet/jsp/el/NotFoundELResolver.java 
b/java/jakarta/servlet/jsp/el/NotFoundELResolver.java
index 90fd930..517758f 100644
--- a/java/jakarta/servlet/jsp/el/NotFoundELResolver.java
+++ b/java/jakarta/servlet/jsp/el/NotFoundELResolver.java
@@ -20,9 +20,11 @@ import java.beans.FeatureDescriptor;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.Objects;
+import java.util.ResourceBundle;
 
 import jakarta.el.ELContext;
 import jakarta.el.ELResolver;
+import jakarta.el.PropertyNotFoundException;
 
 /**
  * The final resolver of the Jakarta Server Pages ELResolver chain. It always
@@ -32,16 +34,36 @@ import jakarta.el.ELResolver;
  */
 public class NotFoundELResolver extends ELResolver {
 
+private static final String LSTRING_FILE = 
"jakarta.servlet.jsp.LocalStrings";
+private static final ResourceBundle lStrings = 
ResourceBundle.getBundle(LSTRING_FILE);
+
 /**
  * {@inheritDoc}
  * 
- * Always resolves the property and always returns {@code null}.
+ * Resolves the property and always returns {@code null} unless the 
provided
+ * context contains a Boolean object with value {@code Boolean.TRUE} as the
+ * value associated with the key
+ * {@code jakarta.servlet.jsp.el.NotFoundELResolver.class} in which case an
+ * exception is thrown. This is to support implementation of the
+ * {@code errorOnELNotFound} page/tag directive.
  *
  * @return Always {@code null}
+ *
+ * @throws PropertyNotFoundException if the provided context contains a
+ * Boolean object with value {@code Boolean.TRUE} as the value
+ * associated with the key
+ * {@code jakarta.servlet.jsp.el.NotFoundELResolver.class}
  */
 @Override
 public Object getValue(ELContext context, Object base, Object property) {
 Objects.requireNonNull(context);
+
+Object obj = context.getContext(this.getClass());
+if (obj instanceof Boolean && ((Boolean) obj).booleanValue()) {
+throw new PropertyNotFoundException(
+lStrings.getString("el.unknown.identifier") + " [" + 
property.toString() + "]");
+}
+
 context.setPropertyResolved(base, property);
 return null;
 }

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org