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 2020/06/15 14:28:47 UTC
[tomcat] 02/02: 3.0 is a valid version for JSP documents in JSP 3.0
onwards
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 9c844788072c67d1f095f632ffd719654d4de21d
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Jun 15 15:27:45 2020 +0100
3.0 is a valid version for JSP documents in JSP 3.0 onwards
---
java/org/apache/jasper/compiler/Validator.java | 2 +-
.../jasper/resources/LocalStrings.properties | 2 +-
.../jasper/resources/LocalStrings_es.properties | 2 +-
.../jasper/resources/LocalStrings_fr.properties | 2 +-
.../jasper/resources/LocalStrings_ja.properties | 2 +-
.../jasper/resources/LocalStrings_ko.properties | 2 +-
.../jasper/resources/LocalStrings_zh_CN.properties | 2 +-
.../jasper/compiler/TestJspDocumentParser.java | 92 ++++++++++++++++++++++
.../jsp/doc-version-invalid/document-0.4.jspx | 25 ++++++
.../jsp/doc-version-invalid/document-1.1.jspx | 25 ++++++
.../jsp/doc-version-invalid/document-1.2.1.jspx | 25 ++++++
.../jsp/doc-version-invalid/document-1.3.jspx | 25 ++++++
.../jsp/doc-version-invalid/document-1.9.jspx | 25 ++++++
.../jsp/doc-version-invalid/document-2.4.jspx | 25 ++++++
.../jsp/doc-version-invalid/document-3.1.jspx | 25 ++++++
.../jsp/doc-version-invalid/document-5.4.jspx | 25 ++++++
.../webapp/jsp/doc-version-valid/document-1.2.jspx | 25 ++++++
.../webapp/jsp/doc-version-valid/document-2.0.jspx | 25 ++++++
.../webapp/jsp/doc-version-valid/document-2.1.jspx | 25 ++++++
.../webapp/jsp/doc-version-valid/document-2.2.jspx | 25 ++++++
.../webapp/jsp/doc-version-valid/document-2.3.jspx | 25 ++++++
.../webapp/jsp/doc-version-valid/document-3.0.jspx | 25 ++++++
webapps/docs/changelog.xml | 8 ++
23 files changed, 457 insertions(+), 7 deletions(-)
diff --git a/java/org/apache/jasper/compiler/Validator.java b/java/org/apache/jasper/compiler/Validator.java
index 0e30afe..289dc94 100644
--- a/java/org/apache/jasper/compiler/Validator.java
+++ b/java/org/apache/jasper/compiler/Validator.java
@@ -533,7 +533,7 @@ class Validator {
String version = n.getTextAttribute("version");
if (!version.equals("1.2") && !version.equals("2.0") &&
!version.equals("2.1") && !version.equals("2.2") &&
- !version.equals("2.3")) {
+ !version.equals("2.3") && !version.equals("3.0")) {
err.jspError(n, "jsp.error.jsproot.version.invalid", version);
}
visitBody(n);
diff --git a/java/org/apache/jasper/resources/LocalStrings.properties b/java/org/apache/jasper/resources/LocalStrings.properties
index d2f303c..3261dcb 100644
--- a/java/org/apache/jasper/resources/LocalStrings.properties
+++ b/java/org/apache/jasper/resources/LocalStrings.properties
@@ -107,7 +107,7 @@ jsp.error.jspoutput.doctypenamesystem=<jsp:output>: 'doctype-root-element'
jsp.error.jspoutput.doctypepublicsystem=<jsp:output>: 'doctype-system' attribute must appear if 'doctype-public' attribute appears
jsp.error.jspoutput.invalidUse=<jsp:output> must not be used in standard syntax
jsp.error.jspoutput.nonemptybody=<jsp:output> must not have a body
-jsp.error.jsproot.version.invalid=Invalid version number: [{0}], must be "1.2", "2.0", "2.1", "2.2" or "2.3"
+jsp.error.jsproot.version.invalid=Invalid version number: [{0}], must be "1.2", "2.0", "2.1", "2.2", "2.3" or "3.0"
jsp.error.jsptext.badcontent='<', when appears in the body of <jsp:text>, must be encapsulated within a CDATA
jsp.error.lastModified=Unable to determine last modified date for file [{0}]
jsp.error.library.invalid=JSP page is invalid according to library [{0}]: [{1}]
diff --git a/java/org/apache/jasper/resources/LocalStrings_es.properties b/java/org/apache/jasper/resources/LocalStrings_es.properties
index e5eb63e..1ee32f3 100644
--- a/java/org/apache/jasper/resources/LocalStrings_es.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_es.properties
@@ -99,7 +99,7 @@ jsp.error.jspoutput.doctypenamesystem=<jsp:output>: atributos 'doctype-roo
jsp.error.jspoutput.doctypepublicsystem=<jsp:output>: atributo 'doctype-system' debe de aparecer si aparece atributo 'doctype-public'
jsp.error.jspoutput.invalidUse=<jsp:output> no se debe de usar en sintáxis estándar
jsp.error.jspoutput.nonemptybody=<jsp:output> no debe de tener un cuerpo
-jsp.error.jsproot.version.invalid=Número incorrecto de versión: [{0}], debe de ser "1.2" o "2.0" o "2.1" o "2.2" o "2.3"
+jsp.error.jsproot.version.invalid=Número incorrecto de versión: [{0}], debe de ser "1.2" o "2.0" o "2.1" o "2.2" o "2.3" o "3.0"
jsp.error.jsptext.badcontent='<', cuando aparece en el cuerpo de <jsp:text>, debe de estar encapsulado dentro de un CDATA
jsp.error.lastModified=No puedo determinar la última fecha de modificación para el fichero [{0}]
jsp.error.library.invalid=La página JSP es incorrecta de acuerdo a la biblioteca [{0}]: [{1}]
diff --git a/java/org/apache/jasper/resources/LocalStrings_fr.properties b/java/org/apache/jasper/resources/LocalStrings_fr.properties
index 41a5fcd..c6ec512 100644
--- a/java/org/apache/jasper/resources/LocalStrings_fr.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_fr.properties
@@ -107,7 +107,7 @@ jsp.error.jspoutput.doctypenamesystem=<jsp:output> : les attributs "doctyp
jsp.error.jspoutput.doctypepublicsystem=L'attribut <jsp:output> : 'doctype-system' doit être présent lorsque l'attribut 'doctype-public' l'est
jsp.error.jspoutput.invalidUse=<jsp:output> ne doit pas être utilisé en syntaxe standard
jsp.error.jspoutput.nonemptybody=<jsp:output> ne doit pas avoir de corps
-jsp.error.jsproot.version.invalid=Le numéro de version [{0}] est invalide, il devrait être "1.2", "2.0", "2.1", "2.2" ou "2.3"
+jsp.error.jsproot.version.invalid=Le numéro de version [{0}] est invalide, il devrait être "1.2", "2.0", "2.1", "2.2", "2.3" ou "3.0"
jsp.error.jsptext.badcontent=Quand '<' apparaît dans le corps d'un <jsp:text>, il doit être encapsulé dans un CDATA\n
jsp.error.lastModified=Impossible de déterminer la date de dernière modification pour le fichier [{0}]
jsp.error.library.invalid=La page JSP page est incorrecte d''après la bibliothèque [{0}] : [{1}]
diff --git a/java/org/apache/jasper/resources/LocalStrings_ja.properties b/java/org/apache/jasper/resources/LocalStrings_ja.properties
index 5c5a284..93e99c2 100644
--- a/java/org/apache/jasper/resources/LocalStrings_ja.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_ja.properties
@@ -108,7 +108,7 @@ jsp.error.jspoutput.doctypenamesystem=<jsp:output>: 'doctype-root-element'
jsp.error.jspoutput.doctypepublicsystem=<jsp:output>: 'doctype-public'属性を指定する場合は、'doctype-system' 属性も指定しなければいけません
jsp.error.jspoutput.invalidUse=<jsp:output> 標準構文の中で使用してはいけません
jsp.error.jspoutput.nonemptybody=<jsp:output> ボディを持ってはいけません
-jsp.error.jsproot.version.invalid=無効なバージョン番号です: [{0}]、"1.2" "2.0" "2.1" "2.2" 又は "2.3" でなければいけません
+jsp.error.jsproot.version.invalid=無効なバージョン番号です: [{0}]、"1.2" "2.0" "2.1" "2.2" "2.3" 又は "3.0" でなければいけません
jsp.error.jsptext.badcontent='<'が<jsp:text>のボディの中に現れる時は、CDATAの中にカプセル化する必要があります
jsp.error.lastModified=ファイル [{0}] の最終更新日時を取得できません。
jsp.error.library.invalid=ライブラリ[{0}]に従うとJSPページは無効です: [{1}]
diff --git a/java/org/apache/jasper/resources/LocalStrings_ko.properties b/java/org/apache/jasper/resources/LocalStrings_ko.properties
index 00302b7..d2afc7e 100644
--- a/java/org/apache/jasper/resources/LocalStrings_ko.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_ko.properties
@@ -108,7 +108,7 @@ jsp.error.jspoutput.doctypenamesystem=<jsp:output>: 'doctype-root-element'
jsp.error.jspoutput.doctypepublicsystem=<jsp:output>: 'doctype-public' 속성이 나타나는 경우에는, 'doctype-system' 속성이 반드시 존재해야 합니다.
jsp.error.jspoutput.invalidUse=<jsp:output>은 표준 문법에서 사용되서는 안됩니다.
jsp.error.jspoutput.nonemptybody=<jsp:output>은 body를 포함해서는 안됩니다.
-jsp.error.jsproot.version.invalid=유효하지 않은 버전: [{0}]. 반드시 다음 중 하나여야 합니다: "1.2", "2.0", "2.1", "2.2", "2.3"
+jsp.error.jsproot.version.invalid=유효하지 않은 버전: [{0}]. 반드시 다음 중 하나여야 합니다: "1.2", "2.0", "2.1", "2.2", "2.3", "3.0"
jsp.error.jsptext.badcontent='<'가 <jsp:text>의 body 내에 존재할 때에는 반드시 CDATA 내에 포함되어야 합니다.
jsp.error.lastModified=파일 [{0}]을(를) 위한 최종 변경 시간을 결정할 수 없습니다.
jsp.error.library.invalid=라이브러리 [{0}]에 의하면, JSP 페이지가 유효하지 않습니다: [{1}]
diff --git a/java/org/apache/jasper/resources/LocalStrings_zh_CN.properties b/java/org/apache/jasper/resources/LocalStrings_zh_CN.properties
index 054cfe4..807940d 100644
--- a/java/org/apache/jasper/resources/LocalStrings_zh_CN.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_zh_CN.properties
@@ -107,7 +107,7 @@ jsp.error.jspoutput.doctypenamesystem=<jsp:output>: 'doctype-root-element'
jsp.error.jspoutput.doctypepublicsystem=&lt;jsp:output&gt;:如果显示“doctype public”属性,则必须显示“doctype system”属性
jsp.error.jspoutput.invalidUse=&lt;jsp:output&gt;不能在标准语法中使用
jsp.error.jspoutput.nonemptybody=<jsp:output>不能有正文
-jsp.error.jsproot.version.invalid=版本号 [{0}] 无效,版本号必须是"1.2"、"2.0"、"2.1"、"2.2"、"2.3"中的一个
+jsp.error.jsproot.version.invalid=版本号 [{0}] 无效,版本号必须是"1.2"、"2.0"、"2.1"、"2.2"、"2.3"、"3.0"中的一个
jsp.error.jsptext.badcontent='&lt;',当出现在&lt; jsp:text&gt;的主体中时,必须封装在CDATA中
jsp.error.lastModified=无法确定文件 [{0}] 的最后修改日期
jsp.error.library.invalid=根据库[{0}](:[{1}],jsp页无效
diff --git a/test/org/apache/jasper/compiler/TestJspDocumentParser.java b/test/org/apache/jasper/compiler/TestJspDocumentParser.java
index 0bfd702..431726c 100644
--- a/test/org/apache/jasper/compiler/TestJspDocumentParser.java
+++ b/test/org/apache/jasper/compiler/TestJspDocumentParser.java
@@ -121,4 +121,96 @@ public class TestJspDocumentParser extends TomcatBaseTest {
Assert.assertEquals("urn:valid", document.getDocumentElement().getNamespaceURI());
Assert.assertEquals("root", document.getDocumentElement().getLocalName());
}
+
+ @Test
+ public void testDocument_0_4() throws Exception {
+ doTestDocument(false, "0.4");
+ }
+
+ @Test
+ public void testDocument_1_1() throws Exception {
+ doTestDocument(false, "1.1");
+ }
+
+ @Test
+ public void testDocument_1_2() throws Exception {
+ doTestDocument(true, "1.2");
+ }
+
+ @Test
+ public void testDocument_1_2_1() throws Exception {
+ doTestDocument(false, "1.2.1");
+ }
+
+ @Test
+ public void testDocument_1_3() throws Exception {
+ doTestDocument(false, "1.3");
+ }
+
+ @Test
+ public void testDocument_1_9() throws Exception {
+ doTestDocument(false, "1.9");
+ }
+
+ @Test
+ public void testDocument_2_0() throws Exception {
+ doTestDocument(true, "2.0");
+ }
+
+ @Test
+ public void testDocument_2_1() throws Exception {
+ doTestDocument(true, "2.1");
+ }
+
+ @Test
+ public void testDocument_2_2() throws Exception {
+ doTestDocument(true, "2.2");
+ }
+
+ @Test
+ public void testDocument_2_3() throws Exception {
+ doTestDocument(true, "2.3");
+ }
+
+ @Test
+ public void testDocument_2_4() throws Exception {
+ doTestDocument(false, "2.4");
+ }
+
+ @Test
+ public void testDocument_3_0() throws Exception {
+ doTestDocument(true, "3.0");
+ }
+
+ @Test
+ public void testDocument_3_1() throws Exception {
+ doTestDocument(false, "3.1");
+ }
+
+ @Test
+ public void testDocument_5_4() throws Exception {
+ doTestDocument(false, "5.4");
+ }
+
+ private void doTestDocument(boolean valid, String version) throws Exception{
+ getTomcatInstanceTestWebapp(false, true);
+
+ StringBuilder url = new StringBuilder("http://localhost:");
+ url.append(getPort());
+ url.append("/test/jsp/doc-version-");
+ if (!valid) {
+ url.append("in");
+ }
+ url.append("valid/document-");
+ url.append(version);
+ url.append(".jspx");
+
+ int rc = getUrl(url.toString(), new ByteChunk(), null);
+
+ if (valid) {
+ Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+ } else {
+ Assert.assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
+ }
+ }
}
diff --git a/test/webapp/jsp/doc-version-invalid/document-0.4.jspx b/test/webapp/jsp/doc-version-invalid/document-0.4.jspx
new file mode 100644
index 0000000..8ad57be
--- /dev/null
+++ b/test/webapp/jsp/doc-version-invalid/document-0.4.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="0.4">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-invalid/document-1.1.jspx b/test/webapp/jsp/doc-version-invalid/document-1.1.jspx
new file mode 100644
index 0000000..38d8391
--- /dev/null
+++ b/test/webapp/jsp/doc-version-invalid/document-1.1.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="1.1">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-invalid/document-1.2.1.jspx b/test/webapp/jsp/doc-version-invalid/document-1.2.1.jspx
new file mode 100644
index 0000000..dcadc60
--- /dev/null
+++ b/test/webapp/jsp/doc-version-invalid/document-1.2.1.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2.1">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-invalid/document-1.3.jspx b/test/webapp/jsp/doc-version-invalid/document-1.3.jspx
new file mode 100644
index 0000000..deaa6cb
--- /dev/null
+++ b/test/webapp/jsp/doc-version-invalid/document-1.3.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="1.3">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-invalid/document-1.9.jspx b/test/webapp/jsp/doc-version-invalid/document-1.9.jspx
new file mode 100644
index 0000000..4634f91
--- /dev/null
+++ b/test/webapp/jsp/doc-version-invalid/document-1.9.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="1.9">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-invalid/document-2.4.jspx b/test/webapp/jsp/doc-version-invalid/document-2.4.jspx
new file mode 100644
index 0000000..d10b068
--- /dev/null
+++ b/test/webapp/jsp/doc-version-invalid/document-2.4.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="2.4">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-invalid/document-3.1.jspx b/test/webapp/jsp/doc-version-invalid/document-3.1.jspx
new file mode 100644
index 0000000..67f429d
--- /dev/null
+++ b/test/webapp/jsp/doc-version-invalid/document-3.1.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="3.1">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-invalid/document-5.4.jspx b/test/webapp/jsp/doc-version-invalid/document-5.4.jspx
new file mode 100644
index 0000000..8126079
--- /dev/null
+++ b/test/webapp/jsp/doc-version-invalid/document-5.4.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="5.4">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-valid/document-1.2.jspx b/test/webapp/jsp/doc-version-valid/document-1.2.jspx
new file mode 100644
index 0000000..0530e6b
--- /dev/null
+++ b/test/webapp/jsp/doc-version-valid/document-1.2.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-valid/document-2.0.jspx b/test/webapp/jsp/doc-version-valid/document-2.0.jspx
new file mode 100644
index 0000000..1aeb3af
--- /dev/null
+++ b/test/webapp/jsp/doc-version-valid/document-2.0.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-valid/document-2.1.jspx b/test/webapp/jsp/doc-version-valid/document-2.1.jspx
new file mode 100644
index 0000000..3c90e07
--- /dev/null
+++ b/test/webapp/jsp/doc-version-valid/document-2.1.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-valid/document-2.2.jspx b/test/webapp/jsp/doc-version-valid/document-2.2.jspx
new file mode 100644
index 0000000..7612ea1
--- /dev/null
+++ b/test/webapp/jsp/doc-version-valid/document-2.2.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="2.2">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-valid/document-2.3.jspx b/test/webapp/jsp/doc-version-valid/document-2.3.jspx
new file mode 100644
index 0000000..d074935
--- /dev/null
+++ b/test/webapp/jsp/doc-version-valid/document-2.3.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="2.3">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/test/webapp/jsp/doc-version-valid/document-3.0.jspx b/test/webapp/jsp/doc-version-valid/document-3.0.jspx
new file mode 100644
index 0000000..11a98ab
--- /dev/null
+++ b/test/webapp/jsp/doc-version-valid/document-3.0.jspx
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<jsp:root
+ xmlns:jsp="http://java.sun.com/JSP/Page" version="3.0">
+<html>
+ <body>
+ <p>00-Hello World</p>
+ </body>
+</html>
+</jsp:root>
\ No newline at end of file
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index de814bc..d37b070 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -81,6 +81,14 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <update>
+ Update the JSP document validation to permit <code>3.0</code> as a valid
+ version attribute for the <code><jsp-root></code> element. (markt)
+ </update>
+ </changelog>
+ </subsection>
<subsection name="Web Applications">
<changelog>
<update>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org