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/02/06 11:40:51 UTC

[tomcat] branch 9.0.x updated (f9faad6 -> 78b6ee8)

This is an automated email from the ASF dual-hosted git repository.

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


    from f9faad6  Increment version number for next development cycle
     new 27a42b9  Parameterize JSP spec version in localization messages to ease re-use
     new 78b6ee8  Parameterize localization string to ease Java EE / Jakarta EE re-use

The 2 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:
 java/org/apache/jasper/Constants.java                       | 2 ++
 java/org/apache/jasper/compiler/TagFileProcessor.java       | 3 ++-
 java/org/apache/jasper/resources/LocalStrings.properties    | 4 ++--
 java/org/apache/jasper/resources/LocalStrings_es.properties | 4 ++--
 java/org/apache/jasper/resources/LocalStrings_fr.properties | 4 ++--
 java/org/apache/jasper/resources/LocalStrings_ja.properties | 4 ++--
 java/org/apache/jasper/resources/LocalStrings_ko.properties | 4 ++--
 java/org/apache/jasper/runtime/HttpJspBase.java             | 3 ++-
 java/org/apache/jasper/runtime/JspFactoryImpl.java          | 3 +--
 webapps/docs/changelog.xml                                  | 8 ++++++++
 10 files changed, 25 insertions(+), 14 deletions(-)


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


[tomcat] 01/02: Parameterize JSP spec version in localization messages to ease re-use

Posted by ma...@apache.org.
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

commit 27a42b9fb4d395fb98c4444e22c477f9c521369c
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Feb 6 10:01:47 2020 +0000

    Parameterize JSP spec version in localization messages to ease re-use
---
 java/org/apache/jasper/Constants.java                       | 2 ++
 java/org/apache/jasper/resources/LocalStrings.properties    | 2 +-
 java/org/apache/jasper/resources/LocalStrings_es.properties | 2 +-
 java/org/apache/jasper/resources/LocalStrings_fr.properties | 2 +-
 java/org/apache/jasper/resources/LocalStrings_ja.properties | 2 +-
 java/org/apache/jasper/resources/LocalStrings_ko.properties | 2 +-
 java/org/apache/jasper/runtime/HttpJspBase.java             | 3 ++-
 java/org/apache/jasper/runtime/JspFactoryImpl.java          | 3 +--
 webapps/docs/changelog.xml                                  | 8 ++++++++
 9 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/jasper/Constants.java b/java/org/apache/jasper/Constants.java
index ebb5fa0..14fc618 100644
--- a/java/org/apache/jasper/Constants.java
+++ b/java/org/apache/jasper/Constants.java
@@ -30,6 +30,8 @@ import java.util.List;
  */
 public class Constants {
 
+    public static final String SPEC_VERSION = "2.3";
+
     /**
      * The base class of the generated servlets.
      */
diff --git a/java/org/apache/jasper/resources/LocalStrings.properties b/java/org/apache/jasper/resources/LocalStrings.properties
index 6574f84..5710da0 100644
--- a/java/org/apache/jasper/resources/LocalStrings.properties
+++ b/java/org/apache/jasper/resources/LocalStrings.properties
@@ -15,7 +15,7 @@
 
 jasper.error.emptybodycontent.nonempty=According to TLD, tag [{0}] must be empty, but is not
 
-jsp.engine.info=Jasper JSP 2.3 Engine
+jsp.engine.info=Jasper JSP {0} Engine
 jsp.error.URLMustStartWithSlash=Path [{0}] must start with a slash character
 jsp.error.action.isnottagfile=[{0}] action can be used in tag files only
 jsp.error.action.istagfile=[{0}] action cannot be used in a tag file
diff --git a/java/org/apache/jasper/resources/LocalStrings_es.properties b/java/org/apache/jasper/resources/LocalStrings_es.properties
index c7c470b..fd7d86c 100644
--- a/java/org/apache/jasper/resources/LocalStrings_es.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_es.properties
@@ -15,7 +15,7 @@
 
 jasper.error.emptybodycontent.nonempty=Según el TLD, el tag [{0}] debe de estar vacío, pero no lo está
 
-jsp.engine.info=Motor Jasper JSP 2.3
+jsp.engine.info=Motor Jasper JSP {0}
 jsp.error.action.isnottagfile=La acción [{0}] sólo se puede usar en archivos tag
 jsp.error.action.istagfile=La acción [{0}] no se puede usar en un archivo tag
 jsp.error.attempt_to_clear_flushed_buffer=Error: Se ha intentado limpiar un buffer que ya había sido escrito
diff --git a/java/org/apache/jasper/resources/LocalStrings_fr.properties b/java/org/apache/jasper/resources/LocalStrings_fr.properties
index d311b8d..110ce83 100644
--- a/java/org/apache/jasper/resources/LocalStrings_fr.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_fr.properties
@@ -15,7 +15,7 @@
 
 jasper.error.emptybodycontent.nonempty=D''après la TLD, le tag [{0}] doit être vide, mais ne l''est pas
 
-jsp.engine.info=Moteur Jasper JSP 2.3
+jsp.engine.info=Moteur Jasper JSP {0}
 jsp.error.URLMustStartWithSlash=Le chemin [{0}] doit commencer par un caractère slash
 jsp.error.action.isnottagfile=L''action [{0}] ne peut être utilisée que dans un fichier tag
 jsp.error.action.istagfile=L''action [{0}] ne peut être utilisée dans un fichier tag
diff --git a/java/org/apache/jasper/resources/LocalStrings_ja.properties b/java/org/apache/jasper/resources/LocalStrings_ja.properties
index 3820aaf..e0fff33 100644
--- a/java/org/apache/jasper/resources/LocalStrings_ja.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_ja.properties
@@ -15,7 +15,7 @@
 
 jasper.error.emptybodycontent.nonempty=TLDに従ってタグ [{0}] は空でなければいけませんが、そうではありません
 
-jsp.engine.info=Jasper JSP 2.3エンジン
+jsp.engine.info=Jasper JSP {0}エンジン
 jsp.error.URLMustStartWithSlash=パス[{0}]はスラッシュ文字で始まる必要があります。
 jsp.error.action.isnottagfile=[{0}] アクションはタグファイル中でのみ使用できません
 jsp.error.action.istagfile=[{0}] アクションはタグファイル中で使用できません
diff --git a/java/org/apache/jasper/resources/LocalStrings_ko.properties b/java/org/apache/jasper/resources/LocalStrings_ko.properties
index 5ca9865..ece8dc4 100644
--- a/java/org/apache/jasper/resources/LocalStrings_ko.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_ko.properties
@@ -15,7 +15,7 @@
 
 jasper.error.emptybodycontent.nonempty=TLD 파일에 따르면, [{0}] 태그는 반드시 비어 있어야 하는데, 그렇지 않습니다,
 
-jsp.engine.info=Jasper JSP 2.3 엔진
+jsp.engine.info=Jasper JSP {0} 엔진
 jsp.error.URLMustStartWithSlash=경로 [{0}]은(는) 반드시 슬래시 문자로 시작해야 합니다.
 jsp.error.action.isnottagfile=[{0}] 액션은 오직 태그 파일들 내에서만 사용될 수 있습니다.
 jsp.error.action.istagfile=[{0}] 액션은 태그 파일 내에서 사용될 수 없습니다.
diff --git a/java/org/apache/jasper/runtime/HttpJspBase.java b/java/org/apache/jasper/runtime/HttpJspBase.java
index 544af4e..d508e99 100644
--- a/java/org/apache/jasper/runtime/HttpJspBase.java
+++ b/java/org/apache/jasper/runtime/HttpJspBase.java
@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.HttpJspPage;
 
+import org.apache.jasper.Constants;
 import org.apache.jasper.compiler.Localizer;
 
 /**
@@ -51,7 +52,7 @@ public abstract class HttpJspBase extends HttpServlet implements HttpJspPage {
 
     @Override
     public String getServletInfo() {
-        return Localizer.getMessage("jsp.engine.info");
+        return Localizer.getMessage("jsp.engine.info", Constants.SPEC_VERSION);
     }
 
     @Override
diff --git a/java/org/apache/jasper/runtime/JspFactoryImpl.java b/java/org/apache/jasper/runtime/JspFactoryImpl.java
index c2a73d4..7f05c82 100644
--- a/java/org/apache/jasper/runtime/JspFactoryImpl.java
+++ b/java/org/apache/jasper/runtime/JspFactoryImpl.java
@@ -38,7 +38,6 @@ import org.apache.jasper.Constants;
  */
 public class JspFactoryImpl extends JspFactory {
 
-    private static final String SPEC_VERSION = "2.3";
     private static final boolean USE_POOL =
         Boolean.parseBoolean(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.USE_POOL", "true"));
     private static final int POOL_SIZE =
@@ -81,7 +80,7 @@ public class JspFactoryImpl extends JspFactory {
         return new JspEngineInfo() {
             @Override
             public String getSpecificationVersion() {
-                return SPEC_VERSION;
+                return Constants.SPEC_VERSION;
             }
         };
     }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d46f660..a6f11e2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -45,6 +45,14 @@
   issues do not "pop up" wrt. others).
 -->
 <section name="Tomcat 9.0.32 (markt)" rtext="in development">
+  <subsection name="Jasper">
+    <changelog>
+      <scode>
+        Parameterize JSP version in localization messages to allow simpler
+        re-use between major versions. (markt)
+      </scode>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 9.0.31 (markt)" rtext="release in progress">
   <subsection name="Catalina">


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


[tomcat] 02/02: Parameterize localization string to ease Java EE / Jakarta EE re-use

Posted by ma...@apache.org.
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

commit 78b6ee8372a25fab7e3bb0748263707e2f69031f
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Feb 6 11:04:04 2020 +0000

    Parameterize localization string to ease Java EE / Jakarta EE re-use
---
 java/org/apache/jasper/compiler/TagFileProcessor.java       | 3 ++-
 java/org/apache/jasper/resources/LocalStrings.properties    | 2 +-
 java/org/apache/jasper/resources/LocalStrings_es.properties | 2 +-
 java/org/apache/jasper/resources/LocalStrings_fr.properties | 2 +-
 java/org/apache/jasper/resources/LocalStrings_ja.properties | 2 +-
 java/org/apache/jasper/resources/LocalStrings_ko.properties | 2 +-
 webapps/docs/changelog.xml                                  | 4 ++--
 7 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/jasper/compiler/TagFileProcessor.java b/java/org/apache/jasper/compiler/TagFileProcessor.java
index 3b3300d..7be773d 100644
--- a/java/org/apache/jasper/compiler/TagFileProcessor.java
+++ b/java/org/apache/jasper/compiler/TagFileProcessor.java
@@ -25,6 +25,7 @@ import java.util.Vector;
 
 import javax.el.MethodExpression;
 import javax.el.ValueExpression;
+import javax.servlet.jsp.tagext.JspFragment;
 import javax.servlet.jsp.tagext.TagAttributeInfo;
 import javax.servlet.jsp.tagext.TagFileInfo;
 import javax.servlet.jsp.tagext.TagInfo;
@@ -252,7 +253,7 @@ class TagFileProcessor {
                 // type is fixed to "JspFragment" and a translation error
                 // must occur if specified.
                 if (type != null) {
-                    err.jspError(n, "jsp.error.fragmentwithtype");
+                    err.jspError(n, "jsp.error.fragmentwithtype", JspFragment.class.getName());
                 }
                 // rtexprvalue is fixed to "true" and a translation error
                 // must occur if specified.
diff --git a/java/org/apache/jasper/resources/LocalStrings.properties b/java/org/apache/jasper/resources/LocalStrings.properties
index 5710da0..17a0ace 100644
--- a/java/org/apache/jasper/resources/LocalStrings.properties
+++ b/java/org/apache/jasper/resources/LocalStrings.properties
@@ -76,7 +76,7 @@ jsp.error.file.already.registered=Recursive include of file [{0}]
 jsp.error.file.cannot.read=Cannot read file: [{0}]
 jsp.error.file.not.found=File [{0}] not found
 jsp.error.flush=Exception occurred when flushing data
-jsp.error.fragmentwithtype=Cannot specify both 'fragment' and 'type' attributes.  If 'fragment' is present, 'type' is fixed as 'javax.servlet.jsp.tagext.JspFragment'
+jsp.error.fragmentwithtype=Cannot specify both 'fragment' and 'type' attributes.  If 'fragment' is present, 'type' is fixed as '{0}'
 jsp.error.function.classnotfound=The class [{0}] specified in TLD for the function [{1}] cannot be found: [{2}]
 jsp.error.include.exception=Unable to include [{0}]
 jsp.error.include.tag=Invalid jsp:include tag
diff --git a/java/org/apache/jasper/resources/LocalStrings_es.properties b/java/org/apache/jasper/resources/LocalStrings_es.properties
index fd7d86c..e5eb63e 100644
--- a/java/org/apache/jasper/resources/LocalStrings_es.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_es.properties
@@ -69,7 +69,7 @@ jsp.error.file.already.registered=El archivo [{0}] ya se ha visto, ¿podría ser
 jsp.error.file.cannot.read=No se puede leer el archivo: [{0}]
 jsp.error.file.not.found=Archivo JSP [{0}] no encontrado
 jsp.error.flush=Excepción sucedida al vaciar los datos
-jsp.error.fragmentwithtype=No puede especificar ambos atributos 'fragment' y 'type'. Si está presente 'fragment', 'type' se pone como 'javax.servlet.jsp.tagext.JspFragment'
+jsp.error.fragmentwithtype=No puede especificar ambos atributos 'fragment' y 'type'. Si está presente 'fragment', 'type' se pone como '{0}'
 jsp.error.function.classnotfound=La clase [{0}] especificada en el TLD para la función [{1}] no se puede hallar: [{2}]
 jsp.error.include.exception=No se puede incluir [{0}]
 jsp.error.include.tag=Tag jsp:include no válido
diff --git a/java/org/apache/jasper/resources/LocalStrings_fr.properties b/java/org/apache/jasper/resources/LocalStrings_fr.properties
index 110ce83..9970182 100644
--- a/java/org/apache/jasper/resources/LocalStrings_fr.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_fr.properties
@@ -76,7 +76,7 @@ jsp.error.file.already.registered=Inclusion récursive du fichier [{0}]
 jsp.error.file.cannot.read=Impossible de lire le fichier: [{0}]
 jsp.error.file.not.found=Le fichier [{0}] n''a pas été trouvé
 jsp.error.flush=Une exception s'est produite lors de l'envoi des données
-jsp.error.fragmentwithtype=On ne peut indiquer à la fois les attributs 'fragment' et 'type'.  Si 'fragment' est présent, 'type' est fixé comme 'javax.servlet.jsp.tagext.JspFragment'
+jsp.error.fragmentwithtype=On ne peut indiquer à la fois les attributs 'fragment' et 'type'.  Si 'fragment' est présent, 'type' est fixé comme '{0}'
 jsp.error.function.classnotfound=La classe [{0}] spécifiée dans la TLD pour la fonction [{1}] n''a pas été trouvée: [{2}]
 jsp.error.include.exception=Impossible d''inclure (include) [{0}]
 jsp.error.include.tag=Tag jsp:include incorrect
diff --git a/java/org/apache/jasper/resources/LocalStrings_ja.properties b/java/org/apache/jasper/resources/LocalStrings_ja.properties
index e0fff33..3bcae7d 100644
--- a/java/org/apache/jasper/resources/LocalStrings_ja.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_ja.properties
@@ -76,7 +76,7 @@ jsp.error.file.already.registered=ファイル [{0}] の再帰的な取り込み
 jsp.error.file.cannot.read=ファイルが読めません: [{0}]
 jsp.error.file.not.found=JSP ファイル [{0}] が見つかりません
 jsp.error.flush=データをフラッシュする際に例外が発生しました。
-jsp.error.fragmentwithtype='fragment'属性と'type'属性を両方指定できません。'fragment'が存在する場合には'type'は'javax.servlet.jsp.tagext.JspFragment'に固定されます
+jsp.error.fragmentwithtype='fragment'属性と'type'属性を両方指定できません。'fragment'が存在する場合には'type'は'{0}'に固定されます
 jsp.error.function.classnotfound=TLDの中で関数 [{1}] に指定されているクラス [{0}] が見つかりません: [{2}]
 jsp.error.include.exception=[{0}] を取り込めません
 jsp.error.include.tag=無効なjsp:includeタグです
diff --git a/java/org/apache/jasper/resources/LocalStrings_ko.properties b/java/org/apache/jasper/resources/LocalStrings_ko.properties
index ece8dc4..38c2f73 100644
--- a/java/org/apache/jasper/resources/LocalStrings_ko.properties
+++ b/java/org/apache/jasper/resources/LocalStrings_ko.properties
@@ -77,7 +77,7 @@ jsp.error.file.already.registered=파일 [{0}]의 재귀적인 include입니다.
 jsp.error.file.cannot.read=파일을 읽을 수 없습니다: [{0}]
 jsp.error.file.not.found=파일 [{0}]을(를) 찾을 수 없습니다.
 jsp.error.flush=데이터를 배출하는 중 예외가 발생했습니다.
-jsp.error.fragmentwithtype='fragment'와 'type' 속성, 둘 다를 지정할 수 없습니다. 만일 'fragment'이 지정되면, 'type'은 'javax.servlet.jsp.tagext.JspFragment'으로 고정됩니다.
+jsp.error.fragmentwithtype='fragment'와 'type' 속성, 둘 다를 지정할 수 없습니다. 만일 'fragment'이 지정되면, 'type'은 '{0}'으로 고정됩니다.
 jsp.error.function.classnotfound=function [{1}]을(를) 위하여 TLD에 지정된, 클래스 [{0}]을(를) 찾을 수 없습니다: [{2}]
 jsp.error.include.exception=[{0}]을(를) include할 수 없습니다.
 jsp.error.include.tag=유효하지 않은 jsp:include 태그
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a6f11e2..5fd4192 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -48,8 +48,8 @@
   <subsection name="Jasper">
     <changelog>
       <scode>
-        Parameterize JSP version in localization messages to allow simpler
-        re-use between major versions. (markt)
+        Parameterize JSP version and API class names in localization messages to 
+        allow simpler re-use between major versions. (markt)
       </scode>
     </changelog>
   </subsection>


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