Re: AprLifecycleListener broken since 9.0.38?

2021-04-08 Thread Rémy Maucherat
On Wed, Apr 7, 2021 at 2:42 PM Rainer Jung  wrote:

> The only direct calls to AprStatus.isAprAvailable() outside of the
> APRLifecycleListener itself are actually in Connector.java. Replacing
> those by calls to the listener seems to work for me:
>
> diff --git a/java/org/apache/catalina/connector/Connector.java
> b/java/org/apache/catalina/connector/Connector.java
> index 1cc15802eb..53a210e6b2 100644
> --- a/java/org/apache/catalina/connector/Connector.java
> +++ b/java/org/apache/catalina/connector/Connector.java
> @@ -29,6 +29,7 @@ import org.apache.catalina.Globals;
>   import org.apache.catalina.LifecycleException;
>   import org.apache.catalina.LifecycleState;
>   import org.apache.catalina.Service;
> +import org.apache.catalina.core.AprLifecycleListener;
>   import org.apache.catalina.core.AprStatus;
>   import org.apache.catalina.util.LifecycleMBeanBase;
>   import org.apache.coyote.AbstractProtocol;
> @@ -80,7 +81,7 @@ public class Connector extends LifecycleMBeanBase  {
>
>
>   public Connector(String protocol) {
> -boolean apr = AprStatus.isAprAvailable() &&
> +boolean apr = AprLifecycleListener.isAprAvailable() &&
>

Ok, so I thought only the first change was significant, the others occur
after AprLifecycleListener runs its init so it should work just fine.

Rémy


>   AprStatus.getUseAprConnector();
>   ProtocolHandler p = null;
>   try {
> @@ -1020,11 +1021,11 @@ public class Connector extends LifecycleMBeanBase
> {
>   throw new
>
> LifecycleException(sm.getString("coyoteConnector.protocolHandlerNoAprListener",
>   getProtocolHandlerClassName()));
>   }
> -if (protocolHandler.isAprRequired() &&
> !AprStatus.isAprAvailable()) {
> +if (protocolHandler.isAprRequired() &&
> !AprLifecycleListener.isAprAvailable()) {
>   throw new
>
> LifecycleException(sm.getString("coyoteConnector.protocolHandlerNoAprLibrary",
>   getProtocolHandlerClassName()));
>   }
> -if (AprStatus.isAprAvailable() && AprStatus.getUseOpenSSL() &&
> +if (AprLifecycleListener.isAprAvailable() &&
> AprStatus.getUseOpenSSL() &&
>   protocolHandler instanceof AbstractHttp11JsseProtocol) {
>   AbstractHttp11JsseProtocol jsseProtocolHandler =
>   (AbstractHttp11JsseProtocol) protocolHandler;
>
> Feel free to apply.
>
> Regards,
>
> Rainer
>
>
> Am 07.04.2021 um 14:32 schrieb Rainer Jung:
> > I think the reason is:
> >
> > o.a.c.connector.Connector checks AprStatus.isAprAvailable(). It
> > previously checked AprLifecycleListener.isAprAvailable(). The difference
> > is, that the old AprLifecycleListener.isAprAvailable() triggers the
> > init() of AprLifecycleListener, whereas AprStatus.isAprAvailable() does
> > not.
> >
> > I think isAprAvailable() is the only method with side effects that was
> > moved from AprLifecycleListener to AprStatus. Since it is still
> > available in AprLifecycleListener, I think it would be safest to
> > typically not call it in AprStatus but instead in AprLifecycleListener.
> >
> > Regards,
> >
> > Rainer
> >
> > Am 07.04.2021 um 14:02 schrieb Rainer Jung:
> >> Maybe related to f4dac6846c548144799b1c3f33aba4eb320a3413.
> >>
> >> Am 07.04.2021 um 13:53 schrieb Rainer Jung:
> >>> Hi there,
> >>>
> >>> a colleague of mine observed a change in behavior starting with TC
> >>> 9.0.38: until 9.0.37 the default server.xml with the connector
> >>> protocol="HTTP/1.1", installed tcnative and attribute
> >>> useAprConnector="true" for the AprLifecycleListener actually starts
> >>> an APR connector as documented and expected:
> >>>
> >>> INFO [main] org.apache.coyote.AbstractProtocol.init Initializing
> >>> ProtocolHandler ["http-apr-8080"]
> >>>
> >>> Same situation starting with 9.0.38 (and at least until 9.0.44):
> >>>
> >>> INFO [main] org.apache.coyote.AbstractProtocol.init Initializing
> >>> ProtocolHandler ["http-nio-8080"]
> >>>
> >>> I increased log level for a coupe of packages to FINEST and see the
> >>> following differences during startup:
> >>>
> >>> FINE [main] org.apache.tomcat.util.IntrospectionUtils.setProperty
> >>> IntrospectionUtils: setProperty(class
> >>> org.apache.catalina.core.AprLifecycleListener SSLEngine=on)
> >>> FINE [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin
> >>> [SetPropertiesRule]{Server/Listener} Setting property
> >>> 'useAprConnector' to 'true'
> >>> FINE [main] org.apache.tomcat.util.IntrospectionUtils.setProperty
> >>> IntrospectionUtils: setProperty(class
> >>> org.apache.catalina.core.AprLifecycleListener useAprConnector=true)
> >>> ### ONLY ADDRESS DIFFERENCE
> >>> -FINE [main] org.apache.tomcat.util.digester.SetNextRule.end
> >>> [SetNextRule]{Server/Listener} Call
> >>>
> org.apache.catalina.core.StandardServer.addLifecycleListener(org.apache.catalina.core.AprLifecycleListener@383534aa)
>
> >>>
> >>> +FINE [main] org.apache.tomcat.util.digester.Se

[tomcat] branch master updated: Trivial clean-up commit to trigger CI build

2021-04-08 Thread markt
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


The following commit(s) were added to refs/heads/master by this push:
 new f2bbf04  Trivial clean-up commit to trigger CI build
f2bbf04 is described below

commit f2bbf049bda65bea9db38babbf456015bf7d3568
Author: Mark Thomas 
AuthorDate: Thu Apr 8 09:15:04 2021 +0100

Trivial clean-up commit to trigger CI build
---
 java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java
index 5f1bc83..41a67b4 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java
@@ -113,8 +113,9 @@ public class JMXAccessorGetTask extends JMXAccessorTask {
 if (result != null) {
 echoResult(attribute,result);
 createProperty(result);
-} else
+} else {
 error = "Attribute " + attribute + " is empty";
+}
 return error;
 }
 }

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



[tomcat] 01/03: Trivial clean-up commit to trigger CI build

2021-04-08 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

commit fc535a34e3e1893abb540472ba53824e74e9b7d0
Author: Mark Thomas 
AuthorDate: Thu Apr 8 09:15:33 2021 +0100

Trivial clean-up commit to trigger CI build
---
 java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java
index 5f1bc83..41a67b4 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java
@@ -113,8 +113,9 @@ public class JMXAccessorGetTask extends JMXAccessorTask {
 if (result != null) {
 echoResult(attribute,result);
 createProperty(result);
-} else
+} else {
 error = "Attribute " + attribute + " is empty";
+}
 return error;
 }
 }

-
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 (af4562d -> 15e70d3)

2021-04-08 Thread markt
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 af4562d  Switch test to use localhost as possible fix for CI 
instability
 new fc535a3  Trivial clean-up commit to trigger CI build
 new 50591b7  Better align 10.0.x, 9.0.x and 8.5.x
 new 15e70d3  Update Java versions used by Travis. Align with 10.0.x

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:
 .travis.yml  |  6 +++---
 java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java |  3 ++-
 java/org/apache/catalina/core/StandardHost.java  | 14 --
 3 files changed, 5 insertions(+), 18 deletions(-)

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



[tomcat] 03/03: Update Java versions used by Travis. Align with 10.0.x

2021-04-08 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

commit 15e70d302fead11831ac55952e0edf25aea3af4f
Author: Mark Thomas 
AuthorDate: Thu Apr 8 09:16:29 2021 +0100

Update Java versions used by Travis. Align with 10.0.x
---
 .travis.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 8033348..1156345 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,8 +34,8 @@ addons:
 install:
 - ARCH=`uname -p`
 - echo $ARCH
-- 
JDK_X64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u242b08.tar.gz";
-- 
JDK_ARM64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u232b09.tar.gz";
+- 
JDK_X64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u282-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u282b08.tar.gz";
+- 
JDK_ARM64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u282-b08/OpenJDK8U-jdk_aarch64_linux_hotspot_jdk8u282-b08.tar.gz";
 - if test "X$ARCH" = "Xaarch64"; then JDK_URL=$JDK_ARM64; else 
JDK_URL=$JDK_X64; fi
 - wget -q $JDK_URL && tar xzf OpenJDK*.tar.gz
 - mv jdk8* jdk
@@ -47,7 +47,7 @@ install:
 - ant -version
 - rm -rf $HOME/tmp
 - export CURR_PWD=`pwd`
-- svn co -q https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x/ 
$HOME/tmp/apr
+- git clone -q -b 1.6.x --single-branch https://github.com/apache/apr.git 
$HOME/tmp/apr
 - cd $HOME/tmp/apr
 - ./buildconf
 - ./configure --prefix=$HOME/tmp/apr-build

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



[tomcat] 02/03: Better align 10.0.x, 9.0.x and 8.5.x

2021-04-08 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

commit 50591b715d4b6ba7e771eac597c794cee4bc1c87
Author: Mark Thomas 
AuthorDate: Thu Apr 8 09:16:00 2021 +0100

Better align 10.0.x, 9.0.x and 8.5.x
---
 java/org/apache/catalina/core/StandardHost.java | 14 --
 1 file changed, 14 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardHost.java 
b/java/org/apache/catalina/core/StandardHost.java
index bf8a096..b275117 100644
--- a/java/org/apache/catalina/core/StandardHost.java
+++ b/java/org/apache/catalina/core/StandardHost.java
@@ -209,19 +209,12 @@ public class StandardHost extends ContainerBase 
implements Host {
 }
 
 
-/**
- * Return the application root for this Host.  This can be an absolute
- * pathname, a relative pathname, or a URL.
- */
 @Override
 public String getAppBase() {
 return this.appBase;
 }
 
 
-/**
- * ({@inheritDoc}
- */
 @Override
 public File getAppBaseFile() {
 
@@ -248,15 +241,8 @@ public class StandardHost extends ContainerBase implements 
Host {
 }
 
 
-/**
- * Set the application root for this Host.  This can be an absolute
- * pathname, a relative pathname, or a URL.
- *
- * @param appBase The new application root
- */
 @Override
 public void setAppBase(String appBase) {
-
 if (appBase.trim().equals("")) {
 log.warn(sm.getString("standardHost.problematicAppBase", 
getName()));
 }

-
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 (63a9470 -> 9eb060f)

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

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


from 63a9470  Switch test to use localhost as possible fix for CI 
instability
 new dd8ce6d  Trivial clean-up commit to trigger CI build
 new ef3d7fd  Better align 10.0.x, 9.0.x and 8.5.x
 new 9eb060f  Update Java versions used by Travis. Align config with 10.0.x

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:
 .travis.yml  |  6 +++---
 java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java |  3 ++-
 java/org/apache/catalina/core/StandardHost.java  | 14 --
 3 files changed, 5 insertions(+), 18 deletions(-)

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



[tomcat] 01/03: Trivial clean-up commit to trigger CI build

2021-04-08 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

commit dd8ce6df813217ad26f39b48ca26b3d6f5510a75
Author: Mark Thomas 
AuthorDate: Thu Apr 8 09:17:04 2021 +0100

Trivial clean-up commit to trigger CI build
---
 java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java
index 5f1bc83..41a67b4 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java
@@ -113,8 +113,9 @@ public class JMXAccessorGetTask extends JMXAccessorTask {
 if (result != null) {
 echoResult(attribute,result);
 createProperty(result);
-} else
+} else {
 error = "Attribute " + attribute + " is empty";
+}
 return error;
 }
 }

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



[tomcat] 03/03: Update Java versions used by Travis. Align config with 10.0.x

2021-04-08 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

commit 9eb060fbd3e1821965212386bc6c3894ed333b76
Author: Mark Thomas 
AuthorDate: Thu Apr 8 09:17:39 2021 +0100

Update Java versions used by Travis. Align config with 10.0.x
---
 .travis.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 8033348..1156345 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,8 +34,8 @@ addons:
 install:
 - ARCH=`uname -p`
 - echo $ARCH
-- 
JDK_X64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u242b08.tar.gz";
-- 
JDK_ARM64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u232b09.tar.gz";
+- 
JDK_X64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u282-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u282b08.tar.gz";
+- 
JDK_ARM64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u282-b08/OpenJDK8U-jdk_aarch64_linux_hotspot_jdk8u282-b08.tar.gz";
 - if test "X$ARCH" = "Xaarch64"; then JDK_URL=$JDK_ARM64; else 
JDK_URL=$JDK_X64; fi
 - wget -q $JDK_URL && tar xzf OpenJDK*.tar.gz
 - mv jdk8* jdk
@@ -47,7 +47,7 @@ install:
 - ant -version
 - rm -rf $HOME/tmp
 - export CURR_PWD=`pwd`
-- svn co -q https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x/ 
$HOME/tmp/apr
+- git clone -q -b 1.6.x --single-branch https://github.com/apache/apr.git 
$HOME/tmp/apr
 - cd $HOME/tmp/apr
 - ./buildconf
 - ./configure --prefix=$HOME/tmp/apr-build

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



[tomcat] 02/03: Better align 10.0.x, 9.0.x and 8.5.x

2021-04-08 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

commit ef3d7fde6077ca036665e6bb955600d929a4931c
Author: Mark Thomas 
AuthorDate: Thu Apr 8 09:17:19 2021 +0100

Better align 10.0.x, 9.0.x and 8.5.x
---
 java/org/apache/catalina/core/StandardHost.java | 14 --
 1 file changed, 14 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardHost.java 
b/java/org/apache/catalina/core/StandardHost.java
index 48e9dfb..3cec9fe 100644
--- a/java/org/apache/catalina/core/StandardHost.java
+++ b/java/org/apache/catalina/core/StandardHost.java
@@ -208,19 +208,12 @@ public class StandardHost extends ContainerBase 
implements Host {
 }
 
 
-/**
- * Return the application root for this Host.  This can be an absolute
- * pathname, a relative pathname, or a URL.
- */
 @Override
 public String getAppBase() {
 return this.appBase;
 }
 
 
-/**
- * ({@inheritDoc}
- */
 @Override
 public File getAppBaseFile() {
 
@@ -247,15 +240,8 @@ public class StandardHost extends ContainerBase implements 
Host {
 }
 
 
-/**
- * Set the application root for this Host.  This can be an absolute
- * pathname, a relative pathname, or a URL.
- *
- * @param appBase The new application root
- */
 @Override
 public void setAppBase(String appBase) {
-
 if (appBase.trim().equals("")) {
 log.warn(sm.getString("standardHost.problematicAppBase", 
getName()));
 }

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



[tomcat] branch master updated: Fix BZ 65218. Update version number to 10.

2021-04-08 Thread markt
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


The following commit(s) were added to refs/heads/master by this push:
 new d650aa2  Fix BZ 65218. Update version number to 10.
d650aa2 is described below

commit d650aa21f12b88144439ca38331f9bef2ea7a897
Author: Mark Thomas 
AuthorDate: Thu Apr 8 09:53:09 2021 +0100

Fix BZ 65218. Update version number to 10.
---
 res/side_left.bmp  | Bin 345238 -> 345238 bytes
 webapps/docs/changelog.xml |   3 +++
 2 files changed, 3 insertions(+)

diff --git a/res/side_left.bmp b/res/side_left.bmp
index cd5fa9e..198ec46 100644
Binary files a/res/side_left.bmp and b/res/side_left.bmp differ
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ee3b9d2..ecc803b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -122,6 +122,9 @@
   
 Update the CXF module to Apache CXF 3.4.3. (remm)
   
+  
+65218: Update the version number shown on the left-hand
+banner of the Tomcat installer for Windows to Apache Tomcat 10. (markt)
 
   
 

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



[Bug 65218] During installation of Tomcat 10, the installer screen display tomcat 9

2021-04-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65218

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Mark Thomas  ---
Thanks for the report. The version number has been fixed for 10.0.6 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Add closing tag

2021-04-08 Thread markt
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


The following commit(s) were added to refs/heads/master by this push:
 new cf4c887  Add closing tag
cf4c887 is described below

commit cf4c8874ddcee6bcdfd218e882591a6a2eed8253
Author: Mark Thomas 
AuthorDate: Thu Apr 8 10:08:54 2021 +0100

Add closing tag
---
 webapps/docs/changelog.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ecc803b..1688ef8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -125,6 +125,7 @@
   
 65218: Update the version number shown on the left-hand
 banner of the Tomcat installer for Windows to Apache Tomcat 10. (markt)
+  
 
   
 

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



buildbot failure in on tomcat-trunk

2021-04-08 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/5780

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch master] d650aa21f12b88144439ca38331f9bef2ea7a897
Blamelist: Mark Thomas 

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot




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



buildbot success in on tomcat-trunk

2021-04-08 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/5781

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch master] cf4c8874ddcee6bcdfd218e882591a6a2eed8253
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] branch 9.0.x updated: Correct Git branch used for 9.0.x

2021-04-08 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 4e249e8  Correct Git branch used for 9.0.x
4e249e8 is described below

commit 4e249e831d2e1ee351e3f0122ed1c7e6af3350e5
Author: Mark Thomas 
AuthorDate: Thu Apr 8 11:11:23 2021 +0100

Correct Git branch used for 9.0.x
---
 build.properties.default | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.properties.default b/build.properties.default
index b4101c0..94b5663 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -35,7 +35,7 @@ version.suffix=-dev
 #ant.tstamp.now=1616047200
 
 # - Source control flags -
-git.branch=master
+git.branch=9.0.x
 
 # - Build control flags -
 # Note enabling validation uses Checkstyle which is LGPL licensed

-
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: Correct comments / align with 10.0.x/9.0.x

2021-04-08 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 3d9aa30  Correct comments / align with 10.0.x/9.0.x
3d9aa30 is described below

commit 3d9aa30d2fd25ab616a0a92c6539faf348b62f89
Author: Mark Thomas 
AuthorDate: Thu Apr 8 11:13:31 2021 +0100

Correct comments / align with 10.0.x/9.0.x
---
 build.properties.default | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index f0d5935..922064c 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -236,7 +236,7 @@ easymock.home=${base.path}/easymock-${easymock.version}
 easymock.jar=${easymock.home}/easymock-${easymock.version}.jar
 
easymock.loc=${base-maven.loc}/org/easymock/easymock/${easymock.version}/easymock-${easymock.version}.jar
 
-# - cglib, used by EasyMock, version 3.3 or later -
+# - cglib, used by EasyMock, version 2.2 or later -
 cglib.version=3.3.0
 cglib.checksum.enabled=true
 cglib.checksum.algorithm=SHA-512
@@ -245,7 +245,7 @@ cglib.home=${base.path}/cglib-${cglib.version}
 cglib.jar=${cglib.home}/cglib-nodep-${cglib.version}.jar
 
cglib.loc=${base-maven.loc}/cglib/cglib-nodep/${cglib.version}/cglib-nodep-${cglib.version}.jar
 
-# - objenesis, used by EasyMock, version 2.6 or later -
+# - objenesis, used by EasyMock, version 1.2 or later -
 objenesis.version=2.6
 objenesis.checksum.enabled=true
 objenesis.checksum.algorithm=SHA-512

-
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 class name typo. Align with 10.0.x/9.0.x

2021-04-08 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 09cf8df  Fix class name typo. Align with 10.0.x/9.0.x
09cf8df is described below

commit 09cf8df6d669b959dd8e78fd8db9e4b05ccd1323
Author: Mark Thomas 
AuthorDate: Thu Apr 8 11:21:49 2021 +0100

Fix class name typo. Align with 10.0.x/9.0.x
---
 build.xml | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/build.xml b/build.xml
index 19be6ed..6610905 100644
--- a/build.xml
+++ b/build.xml
@@ -281,7 +281,7 @@
 
 
 
-
+
 
 
 
@@ -771,7 +771,7 @@
   filesId="files.annotations-api"
   manifest="${tomcat.manifests}/annotations-api.jar.manifest" />
 
-
+
 
 
-
+
 
 
 
 
-
+
 
 
-
+
 

[tomcat] branch 9.0.x updated: Fix class name typo. Align with 10.0.x

2021-04-08 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 6c89e62  Fix class name typo. Align with 10.0.x
6c89e62 is described below

commit 6c89e6212e435394e97bef3366ee60a13a632022
Author: Mark Thomas 
AuthorDate: Thu Apr 8 11:21:35 2021 +0100

Fix class name typo. Align with 10.0.x
---
 build.xml | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/build.xml b/build.xml
index 2958ccd..fccbdf8 100644
--- a/build.xml
+++ b/build.xml
@@ -283,7 +283,7 @@
 
 
 
-
+
 
 
 
@@ -1024,7 +1024,7 @@
   manifest="${tomcat.manifests}/annotations-api.jar.manifest"
   addOSGi="true" />
 
-
+
 
 
-
+
 
 
 
 
-
+
 
 
-
+
 

[tomcat] branch master updated: Remove the milestone versions from the spec JARs

2021-04-08 Thread markt
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


The following commit(s) were added to refs/heads/master by this push:
 new 9035ae0  Remove the milestone versions from the spec JARs
9035ae0 is described below

commit 9035ae015a1285792286f6b0d6af24e7e55f71e8
Author: Mark Thomas 
AuthorDate: Thu Apr 8 11:30:10 2021 +0100

Remove the milestone versions from the spec JARs
---
 build.xml | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/build.xml b/build.xml
index 254d5b4..38aeaf2 100644
--- a/build.xml
+++ b/build.xml
@@ -53,17 +53,17 @@
 
   
   
-  
+  
   
-  
+  
   
-  
+  
   
-  
+  
   
-  
+  
   
-  
+  
 
   
   

-
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: Parameterize specification versions - align with 10.0.x

2021-04-08 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 a1d7874  Parameterize specification versions - align with 10.0.x
a1d7874 is described below

commit a1d7874c81b9c52c1c2e7415a92296376d4c4a86
Author: Mark Thomas 
AuthorDate: Thu Apr 8 11:41:58 2021 +0100

Parameterize specification versions - align with 10.0.x
---
 build.xml | 58 +++---
 1 file changed, 31 insertions(+), 27 deletions(-)

diff --git a/build.xml b/build.xml
index fccbdf8..15d27fb 100644
--- a/build.xml
+++ b/build.xml
@@ -51,15 +51,19 @@
   
   
 
-  
-  
-  
-  
-  
-  
-  
-  
-  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 
   
   
@@ -2226,9 +2230,9 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   sourcepath="${tomcat.dist}/src/java"
   destdir="${tomcat.dist}/webapps/docs/annotationapi"
   version="true"
-  windowtitle="Common Annotations 1.3 API Documentation - Apache Tomcat 
${version}"
-  doctitle="Common Annotations 1.3 API - Apache Tomcat ${version}"
-  header="Common Annotations 1.3 - Apache Tomcat 
${version}"
+  windowtitle="Common Annotations ${annotation.spec.version} API 
Documentation - Apache Tomcat ${version}"
+  doctitle="Common Annotations ${annotation.spec.version} API - Apache 
Tomcat ${version}"
+  header="Common Annotations ${annotation.spec.version} - Apache 
Tomcat ${version}"
   bottom="Copyright © 2000-${year} Apache Software Foundation. 
All Rights Reserved."
   encoding="UTF-8"
   docencoding="UTF-8"
@@ -2248,9 +2252,9 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   sourcepath="${tomcat.dist}/src/java"
   destdir="${tomcat.dist}/webapps/docs/servletapi"
   version="true"
-  windowtitle="Servlet 4.0 API Documentation - Apache Tomcat ${version}"
-  doctitle="Servlet 4.0 API - Apache Tomcat ${version}"
-  header="Servlet 4.0 - Apache Tomcat ${version}"
+  windowtitle="Servlet {servlet.spec.version} API Documentation - Apache 
Tomcat ${version}"
+  doctitle="Servlet {servlet.spec.version} API - Apache Tomcat ${version}"
+  header="Servlet {servlet.spec.version} - Apache Tomcat 
${version}"
   bottom="Copyright © 2000-${year} Apache Software Foundation. 
All Rights Reserved."
   encoding="UTF-8"
   docencoding="UTF-8"
@@ -2269,9 +2273,9 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   sourcepath="${tomcat.dist}/src/java"
   destdir="${tomcat.dist}/webapps/docs/jspapi"
   version="true"
-  windowtitle="JSP 2.3 API Documentation - Apache Tomcat ${version}"
-  doctitle="JSP 2.3 API - Apache Tomcat ${version}"
-  header="JSP 2.3 - Apache Tomcat ${version}"
+  windowtitle="JSP ${jsp.spec.version} API Documentation - Apache Tomcat 
${version}"
+  doctitle="JSP ${jsp.spec.version} API - Apache Tomcat ${version}"
+  header="JSP ${jsp.spec.version} - Apache Tomcat 
${version}"
   bottom="Copyright © 2000-${year} Apache Software Foundation. 
All Rights Reserved."
   encoding="UTF-8"
   docencoding="UTF-8"
@@ -2290,9 +2294,9 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   sourcepath="${tomcat.dist}/src/java"
   destdir="${tomcat.dist}/webapps/docs/elapi"
   version="true"
-  windowtitle="EL 3.0 API Documentation - Apache Tomcat ${version}"
-  doctitle="EL 3.0 API - Apache Tomcat ${version}"
-  header="EL 3.0 - Apache Tomcat ${version}"
+  windowtitle="EL ${el.spec.version} API Documentation - Apache Tomcat 
${version}"
+  doctitle="EL ${el.spec.version} API - Apache Tomcat ${version}"
+  header="EL ${el.spec.version} - Apache Tomcat 
${version}"
   bottom="Copyright © 2000-${year} Apache Software Foundation. 
All Rights Reserved."
   encoding="UTF-8"
   docencoding="UTF-8"
@@ -2311,9 +2315,9 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   sourcepath="${tomcat.dist}/src/java"
   destdir="${tomcat.dist}/webapps/docs/websocketapi"
   version="true"
-  windowtitle="WebSocket 1.1 API Documentation - Apache Tomcat ${version}"
-  doctitle="WebSocket 1.1 API - Apache Tomcat ${version}"
-  header="WebSocket 1.1 - Apache Tomcat ${version}"
+  windowtitle="WebSocket ${websocket.spec.version} API Documentation - 
Apache Tomcat ${version}"
+  doctitle="WebSocket ${websocket.spec.version} API - Apache Tomcat 
${version}"
+  header="WebSocket ${websocket.spec.version} - Apache Tomcat 
${version}"
   bottom="Copyright © 2000-${year} Apache Software Foundation. 
All Rights Reserved."
   encoding="UTF-8"
   

[tomcat] branch 8.5.x updated: Parameterize specification versions - align with 10.0.x/9.0.x

2021-04-08 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 fa4ccc8  Parameterize specification versions - align with 10.0.x/9.0.x
fa4ccc8 is described below

commit fa4ccc83a8d28431be6e4202baa5d3f1b6d9e590
Author: Mark Thomas 
AuthorDate: Thu Apr 8 11:42:06 2021 +0100

Parameterize specification versions - align with 10.0.x/9.0.x
---
 build.xml | 58 +++---
 1 file changed, 31 insertions(+), 27 deletions(-)

diff --git a/build.xml b/build.xml
index 6610905..3368c10 100644
--- a/build.xml
+++ b/build.xml
@@ -44,15 +44,19 @@
   
   
 
-  
-  
-  
-  
-  
-  
-  
-  
-  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 
   
   
@@ -1904,9 +1908,9 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   sourcepath="${tomcat.dist}/src/java"
   destdir="${tomcat.dist}/webapps/docs/annotationapi"
   version="true"
-  windowtitle="Common Annotations 1.2 API Documentation - Apache Tomcat 
${version}"
-  doctitle="Common Annotations 1.2 API - Apache Tomcat ${version}"
-  header="Common Annotations 1.2 - Apache Tomcat 
${version}"
+  windowtitle="Common Annotations ${annotation.spec.version} API 
Documentation - Apache Tomcat ${version}"
+  doctitle="Common Annotations ${annotation.spec.version} API - Apache 
Tomcat ${version}"
+  header="Common Annotations ${annotation.spec.version} - Apache 
Tomcat ${version}"
   bottom="Copyright © 2000-${year} Apache Software Foundation. 
All Rights Reserved."
   encoding="UTF-8"
   docencoding="UTF-8"
@@ -1926,9 +1930,9 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   sourcepath="${tomcat.dist}/src/java"
   destdir="${tomcat.dist}/webapps/docs/servletapi"
   version="true"
-  windowtitle="Servlet 3.1 API Documentation - Apache Tomcat ${version}"
-  doctitle="Servlet 3.1 API - Apache Tomcat ${version}"
-  header="Servlet 3.1 - Apache Tomcat ${version}"
+  windowtitle="Servlet {servlet.spec.version} API Documentation - Apache 
Tomcat ${version}"
+  doctitle="Servlet {servlet.spec.version} API - Apache Tomcat ${version}"
+  header="Servlet {servlet.spec.version} - Apache Tomcat 
${version}"
   bottom="Copyright © 2000-${year} Apache Software Foundation. 
All Rights Reserved."
   encoding="UTF-8"
   docencoding="UTF-8"
@@ -1948,9 +1952,9 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   sourcepath="${tomcat.dist}/src/java"
   destdir="${tomcat.dist}/webapps/docs/jspapi"
   version="true"
-  windowtitle="JSP 2.3 API Documentation - Apache Tomcat ${version}"
-  doctitle="JSP 2.3 API - Apache Tomcat ${version}"
-  header="JSP 2.3 - Apache Tomcat ${version}"
+  windowtitle="JSP ${jsp.spec.version} API Documentation - Apache Tomcat 
${version}"
+  doctitle="JSP ${jsp.spec.version} API - Apache Tomcat ${version}"
+  header="JSP ${jsp.spec.version} - Apache Tomcat 
${version}"
   bottom="Copyright © 2000-${year} Apache Software Foundation. 
All Rights Reserved."
   encoding="UTF-8"
   docencoding="UTF-8"
@@ -1970,9 +1974,9 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   sourcepath="${tomcat.dist}/src/java"
   destdir="${tomcat.dist}/webapps/docs/elapi"
   version="true"
-  windowtitle="EL 3.0 API Documentation - Apache Tomcat ${version}"
-  doctitle="EL 3.0 API - Apache Tomcat ${version}"
-  header="EL 3.0 - Apache Tomcat ${version}"
+  windowtitle="EL ${el.spec.version} API Documentation - Apache Tomcat 
${version}"
+  doctitle="EL ${el.spec.version} API - Apache Tomcat ${version}"
+  header="EL ${el.spec.version} - Apache Tomcat 
${version}"
   bottom="Copyright © 2000-${year} Apache Software Foundation. 
All Rights Reserved."
   encoding="UTF-8"
   docencoding="UTF-8"
@@ -1992,9 +1996,9 @@ Apache Tomcat ${version} native binaries for Win64 
AMD64/EMT64 platform.
   sourcepath="${tomcat.dist}/src/java"
   destdir="${tomcat.dist}/webapps/docs/websocketapi"
   version="true"
-  windowtitle="WebSocket 1.1 API Documentation - Apache Tomcat ${version}"
-  doctitle="WebSocket 1.1 API - Apache Tomcat ${version}"
-  header="WebSocket 1.1 - Apache Tomcat ${version}"
+  windowtitle="WebSocket ${websocket.spec.version} API Documentation - 
Apache Tomcat ${version}"
+  doctitle="WebSocket ${websocket.spec.version} API - Apache Tomcat 
${version}"
+  header="WebSocket ${websocket.spec.version} - Apache Tomcat 
${version}"
   bottom="Copyright © 2000-${year} Apache Software Foundation. 
All Rights Reserved."
   encoding

[tomcat] branch 9.0.x updated (a1d7874 -> 9e70d2e)

2021-04-08 Thread markt
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 a1d7874  Parameterize specification versions - align with 10.0.x
 add 9e70d2e  Align with 10.0.x

No new revisions were added by this update.

Summary of changes:
 CONTRIBUTING.md | 1 +
 1 file changed, 1 insertion(+)

-
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: Align with 10.0.x/9.0.x

2021-04-08 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 711e934  Align with 10.0.x/9.0.x
711e934 is described below

commit 711e934b0a15a380b027bd7d99275ff3208c0227
Author: Mark Thomas 
AuthorDate: Thu Apr 8 11:58:47 2021 +0100

Align with 10.0.x/9.0.x
---
 CONTRIBUTING.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 83968b2..c1fd639 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -81,6 +81,7 @@ manually generate the patch file by using diff. If this is 
what you want, you
 can download the sources from the "Source Code Distributions" section of the
 Download Page. There is one such page for every major Tomcat version:
 
+- [Tomcat 10](https://tomcat.apache.org/download-10.cgi)
 - [Tomcat 9](https://tomcat.apache.org/download-90.cgi)
 - [Tomcat 8](https://tomcat.apache.org/download-80.cgi)
 - [Tomcat 7](https://tomcat.apache.org/download-70.cgi)
@@ -89,7 +90,7 @@ Download Page. There is one such page for every major Tomcat 
version:
 
 If you have chosen to attach a patch to the Bugzilla issue (or email
 one), then you'll need to download the sources as noted above, make your
-desired changes and then manually generate your patch using diff (other
+desired changes and then manually generate your patch using diff (or any
 other tool).
 
 # GitHub

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



Re: AprLifecycleListener broken since 9.0.38?

2021-04-08 Thread Rainer Jung

Hi Remy,

Filip wrote in the git commit message "Avoid having to load APR classes 
in the Connector". If this is an important goal for TC 9, we would need 
some other place during TC startup that loads the APR classes before the 
connector gets instantiated. I don't know, what a good place would be. 
Currently it seems, the connector gets instantiated while the digester 
processes server.xml, and the Lifecycle events that would init the 
AprLifecycleListener start after that phase, so too late for the 
connector. Not sure whether it would be feasible to use a digester end 
method in a rule for the AprLifecycleListener to call its static init() 
after it has configured the class.


My patch simply reverts the part of Filip's change in the Connector 
class related to isAprAvailable() back to the 9.0.37 situation.


Using explicit className surely is possible, but I think we shouldn't 
break the well known and documented auto-behavior in TC up until 9. For 
example our Windows binary distribution contains tcnative, so each TC 9 
installed with that download and having edited server.xml with 
useAprConnector="true" automatically switches to the APR connectoer, If 
people update after 9.0.37, it will no longer use APR without being made 
aware.


Concerning the three places in Connector, I agree, that only the first 
is needed.


Regards,

Rainer

Am 08.04.2021 um 09:29 schrieb Rémy Maucherat:

On Wed, Apr 7, 2021 at 2:42 PM Rainer Jung  wrote:


The only direct calls to AprStatus.isAprAvailable() outside of the
APRLifecycleListener itself are actually in Connector.java. Replacing
those by calls to the listener seems to work for me:

diff --git a/java/org/apache/catalina/connector/Connector.java
b/java/org/apache/catalina/connector/Connector.java
index 1cc15802eb..53a210e6b2 100644
--- a/java/org/apache/catalina/connector/Connector.java
+++ b/java/org/apache/catalina/connector/Connector.java
@@ -29,6 +29,7 @@ import org.apache.catalina.Globals;
   import org.apache.catalina.LifecycleException;
   import org.apache.catalina.LifecycleState;
   import org.apache.catalina.Service;
+import org.apache.catalina.core.AprLifecycleListener;
   import org.apache.catalina.core.AprStatus;
   import org.apache.catalina.util.LifecycleMBeanBase;
   import org.apache.coyote.AbstractProtocol;
@@ -80,7 +81,7 @@ public class Connector extends LifecycleMBeanBase  {


   public Connector(String protocol) {
-boolean apr = AprStatus.isAprAvailable() &&
+boolean apr = AprLifecycleListener.isAprAvailable() &&



Ok, so I thought only the first change was significant, the others occur
after AprLifecycleListener runs its init so it should work just fine.

Rémy



   AprStatus.getUseAprConnector();
   ProtocolHandler p = null;
   try {
@@ -1020,11 +1021,11 @@ public class Connector extends LifecycleMBeanBase
{
   throw new

LifecycleException(sm.getString("coyoteConnector.protocolHandlerNoAprListener",
   getProtocolHandlerClassName()));
   }
-if (protocolHandler.isAprRequired() &&
!AprStatus.isAprAvailable()) {
+if (protocolHandler.isAprRequired() &&
!AprLifecycleListener.isAprAvailable()) {
   throw new

LifecycleException(sm.getString("coyoteConnector.protocolHandlerNoAprLibrary",
   getProtocolHandlerClassName()));
   }
-if (AprStatus.isAprAvailable() && AprStatus.getUseOpenSSL() &&
+if (AprLifecycleListener.isAprAvailable() &&
AprStatus.getUseOpenSSL() &&
   protocolHandler instanceof AbstractHttp11JsseProtocol) {
   AbstractHttp11JsseProtocol jsseProtocolHandler =
   (AbstractHttp11JsseProtocol) protocolHandler;

Feel free to apply.

Regards,

Rainer


Am 07.04.2021 um 14:32 schrieb Rainer Jung:

I think the reason is:

o.a.c.connector.Connector checks AprStatus.isAprAvailable(). It
previously checked AprLifecycleListener.isAprAvailable(). The difference
is, that the old AprLifecycleListener.isAprAvailable() triggers the
init() of AprLifecycleListener, whereas AprStatus.isAprAvailable() does
not.

I think isAprAvailable() is the only method with side effects that was
moved from AprLifecycleListener to AprStatus. Since it is still
available in AprLifecycleListener, I think it would be safest to
typically not call it in AprStatus but instead in AprLifecycleListener.

Regards,

Rainer

Am 07.04.2021 um 14:02 schrieb Rainer Jung:

Maybe related to f4dac6846c548144799b1c3f33aba4eb320a3413.

Am 07.04.2021 um 13:53 schrieb Rainer Jung:

Hi there,

a colleague of mine observed a change in behavior starting with TC
9.0.38: until 9.0.37 the default server.xml with the connector
protocol="HTTP/1.1", installed tcnative and attribute
useAprConnector="true" for the AprLifecycleListener actually starts
an APR connector as documented and expected:

INFO [main] org.apache.coyote.AbstractProtocol.init Initializing
ProtocolHandler ["http-apr-8080"

[tomcat] branch 9.0.x updated (9e70d2e -> 59339a4)

2021-04-08 Thread markt
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 9e70d2e  Align with 10.0.x
 add 59339a4  Better align 10.0.x/9.0.x/8.5.x

No new revisions were added by this update.

Summary of changes:
 README.md | 2 ++
 1 file changed, 2 insertions(+)

-
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: Better align 10.0.x/9.0.x/8.5.x

2021-04-08 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 930764e  Better align 10.0.x/9.0.x/8.5.x
930764e is described below

commit 930764ed0ff150c8ebda6ac46ea74434dee643a7
Author: Mark Thomas 
AuthorDate: Thu Apr 8 12:03:59 2021 +0100

Better align 10.0.x/9.0.x/8.5.x
---
 .gitignore   | 3 ++-
 BUILDING.txt | 2 +-
 README.md| 2 ++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9202ec7..8901fb2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,10 +26,11 @@ mvn.properties
 .ant-targets-build.xml
 .checkstyle
 .classpath
+.externalToolBuilders
 .fbprefs
-.idea
 .project
 .settings
+.idea
 .vscode
 *.iml
 *.ipr
diff --git a/BUILDING.txt b/BUILDING.txt
index 11f68ca..0675650 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -184,7 +184,7 @@ each release package has the appropriate line-endings.
 (4) Updating sources and rebuilding
 
 It is recommended that you regularly update the downloaded Tomcat 
@VERSION_MAJOR_MINOR@
-sources using your SVN client.
+sources using your git client.
 
 For a quick rebuild of only modified code you can use:
 
diff --git a/README.md b/README.md
index 9a8e002..ec1353d 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,7 @@ project logo are trademarks of the Apache Software Foundation.
 For every major Tomcat version there is one download page containing
 links to the latest binary and source code downloads, but also
 links for browsing the download directories and archives:
+- [Tomcat 10](https://tomcat.apache.org/download-10.cgi)
 - [Tomcat 9](https://tomcat.apache.org/download-90.cgi)
 - [Tomcat 8](https://tomcat.apache.org/download-80.cgi)
 - [Tomcat 7](https://tomcat.apache.org/download-70.cgi)
@@ -42,6 +43,7 @@ The documentation available as of the date of this release is
 included in the docs webapp which ships with tomcat. You can access that webapp
 by starting tomcat and visiting  in your browser.
 The most up-to-date documentation for each version can be found at:
+- [Tomcat 10](https://tomcat.apache.org/tomcat-10.0-doc/)
 - [Tomcat 9](https://tomcat.apache.org/tomcat-9.0-doc/)
 - [Tomcat 8](https://tomcat.apache.org/tomcat-8.5-doc/)
 - [Tomcat 7](https://tomcat.apache.org/tomcat-7.0-doc/)

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



[tomcat] branch master updated: Better align 10.0.x/9.0.x/8.5.x

2021-04-08 Thread markt
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


The following commit(s) were added to refs/heads/master by this push:
 new 9cc8ceb  Better align 10.0.x/9.0.x/8.5.x
9cc8ceb is described below

commit 9cc8ceb8a1e8c119b4982c2d5d2695566264f208
Author: Mark Thomas 
AuthorDate: Thu Apr 8 12:03:49 2021 +0100

Better align 10.0.x/9.0.x/8.5.x
---
 .gitignore| 1 +
 RELEASE-NOTES | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index e2d604f..8901fb2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,7 @@ mvn.properties
 .ant-targets-build.xml
 .checkstyle
 .classpath
+.externalToolBuilders
 .fbprefs
 .project
 .settings
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 640401f..fbcb6e8 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -45,9 +45,6 @@ Tomcat @VERSION_MAJOR_MINOR@ is designed to run on Java 
@MIN_JAVA_VERSION@ and l
 API Stability:
 ==
 
-The following notes on API stability only applies once Tomcat 10.0.x has had 
its
-first stable release.
-
 The public interfaces for the following classes are fixed and will not be
 changed at all during the remaining lifetime of the @VERSION_MAJOR@.x series:
 - All classes in the jakarta namespace

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



buildbot success in on tomcat-85-trunk

2021-04-08 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-85-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-85-trunk/builds/2683

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-85-commit' 
triggered this build
Build Source Stamp: [branch 8.5.x] fa4ccc83a8d28431be6e4202baa5d3f1b6d9e590
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



TCK Failures on WebSocket

2021-04-08 Thread Jean-Louis MONTEIRO
Hi,

I am running WebSocket TCK on TomEE and I'm having some issues.
Wondering if I missed some configuration.

Essentially the TCK is deploying an application with this class
https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/OnMessageServerEndpoint.java

It fails to deploy

Caused by: jakarta.websocket.DeploymentException: De multiples
paramètres de message sont présents sur la méthode [echo] de la classe
[com.sun.ts.tests.websocket.negdep.onmessage.srv.binarybytebufferint.OnMessageServerEndpoint]
qui a été annotée avec OnMessage
   at 
org.apache.tomcat.websocket.pojo.PojoMethodMapping$MessageHandlerInfo.(PojoMethodMapping.java:543)
   at 
org.apache.tomcat.websocket.pojo.PojoMethodMapping.(PojoMethodMapping.java:139)
   at 
org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:154)
   at 
org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:278)
   at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:126)


>From the wiki, Tomcat is supposed to be passing the WebSocket TCK.
Do you have pointers to help?

Thanks

-- 
Jean-Louis


Re: AprLifecycleListener broken since 9.0.38?

2021-04-08 Thread Rémy Maucherat
On Thu, Apr 8, 2021 at 1:01 PM Rainer Jung  wrote:

> Hi Remy,
>
> Filip wrote in the git commit message "Avoid having to load APR classes
> in the Connector". If this is an important goal for TC 9, we would need
> some other place during TC startup that loads the APR classes before the
> connector gets instantiated. I don't know, what a good place would be.
> Currently it seems, the connector gets instantiated while the digester
> processes server.xml, and the Lifecycle events that would init the
> AprLifecycleListener start after that phase, so too late for the
> connector. Not sure whether it would be feasible to use a digester end
> method in a rule for the AprLifecycleListener to call its static init()
> after it has configured the class.
>
> My patch simply reverts the part of Filip's change in the Connector
> class related to isAprAvailable() back to the 9.0.37 situation.
>

I think it should be fine now since AprStatus allows avoiding using
AprLIfecycleListener if it is not configured.


>
> Using explicit className surely is possible, but I think we shouldn't
> break the well known and documented auto-behavior in TC up until 9. For
> example our Windows binary distribution contains tcnative, so each TC 9
> installed with that download and having edited server.xml with
> useAprConnector="true" automatically switches to the APR connectoer, If
> people update after 9.0.37, it will no longer use APR without being made
> aware.
>
> Concerning the three places in Connector, I agree, that only the first
> is needed.
>

All good then.

Rémy

>
> Regards,
>
> Rainer
>
> Am 08.04.2021 um 09:29 schrieb Rémy Maucherat:
> > On Wed, Apr 7, 2021 at 2:42 PM Rainer Jung 
> wrote:
> >
> >> The only direct calls to AprStatus.isAprAvailable() outside of the
> >> APRLifecycleListener itself are actually in Connector.java. Replacing
> >> those by calls to the listener seems to work for me:
> >>
> >> diff --git a/java/org/apache/catalina/connector/Connector.java
> >> b/java/org/apache/catalina/connector/Connector.java
> >> index 1cc15802eb..53a210e6b2 100644
> >> --- a/java/org/apache/catalina/connector/Connector.java
> >> +++ b/java/org/apache/catalina/connector/Connector.java
> >> @@ -29,6 +29,7 @@ import org.apache.catalina.Globals;
> >>import org.apache.catalina.LifecycleException;
> >>import org.apache.catalina.LifecycleState;
> >>import org.apache.catalina.Service;
> >> +import org.apache.catalina.core.AprLifecycleListener;
> >>import org.apache.catalina.core.AprStatus;
> >>import org.apache.catalina.util.LifecycleMBeanBase;
> >>import org.apache.coyote.AbstractProtocol;
> >> @@ -80,7 +81,7 @@ public class Connector extends LifecycleMBeanBase  {
> >>
> >>
> >>public Connector(String protocol) {
> >> -boolean apr = AprStatus.isAprAvailable() &&
> >> +boolean apr = AprLifecycleListener.isAprAvailable() &&
> >>
> >
> > Ok, so I thought only the first change was significant, the others occur
> > after AprLifecycleListener runs its init so it should work just fine.
> >
> > Rémy
> >
> >
> >>AprStatus.getUseAprConnector();
> >>ProtocolHandler p = null;
> >>try {
> >> @@ -1020,11 +1021,11 @@ public class Connector extends
> LifecycleMBeanBase
> >> {
> >>throw new
> >>
> >>
> LifecycleException(sm.getString("coyoteConnector.protocolHandlerNoAprListener",
> >>getProtocolHandlerClassName()));
> >>}
> >> -if (protocolHandler.isAprRequired() &&
> >> !AprStatus.isAprAvailable()) {
> >> +if (protocolHandler.isAprRequired() &&
> >> !AprLifecycleListener.isAprAvailable()) {
> >>throw new
> >>
> >>
> LifecycleException(sm.getString("coyoteConnector.protocolHandlerNoAprLibrary",
> >>getProtocolHandlerClassName()));
> >>}
> >> -if (AprStatus.isAprAvailable() && AprStatus.getUseOpenSSL() &&
> >> +if (AprLifecycleListener.isAprAvailable() &&
> >> AprStatus.getUseOpenSSL() &&
> >>protocolHandler instanceof
> AbstractHttp11JsseProtocol) {
> >>AbstractHttp11JsseProtocol jsseProtocolHandler =
> >>(AbstractHttp11JsseProtocol) protocolHandler;
> >>
> >> Feel free to apply.
> >>
> >> Regards,
> >>
> >> Rainer
> >>
> >>
> >> Am 07.04.2021 um 14:32 schrieb Rainer Jung:
> >>> I think the reason is:
> >>>
> >>> o.a.c.connector.Connector checks AprStatus.isAprAvailable(). It
> >>> previously checked AprLifecycleListener.isAprAvailable(). The
> difference
> >>> is, that the old AprLifecycleListener.isAprAvailable() triggers the
> >>> init() of AprLifecycleListener, whereas AprStatus.isAprAvailable() does
> >>> not.
> >>>
> >>> I think isAprAvailable() is the only method with side effects that was
> >>> moved from AprLifecycleListener to AprStatus. Since it is still
> >>> available in AprLifecycleListener, I think it would be safest to
> >>> typically not call it in AprS

Re: TCK Failures on WebSocket

2021-04-08 Thread Mark Thomas

On 08/04/2021 14:10, Jean-Louis MONTEIRO wrote:

Hi,

I am running WebSocket TCK on TomEE and I'm having some issues.
Wondering if I missed some configuration.

Essentially the TCK is deploying an application with this class
https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/OnMessageServerEndpoint.java

It fails to deploy


That is expected. From memory all the ...negdep... tests are expected to 
fail deployment.


Mark




Caused by: jakarta.websocket.DeploymentException: De multiples
paramètres de message sont présents sur la méthode [echo] de la classe
[com.sun.ts.tests.websocket.negdep.onmessage.srv.binarybytebufferint.OnMessageServerEndpoint]
qui a été annotée avec OnMessage
at 
org.apache.tomcat.websocket.pojo.PojoMethodMapping$MessageHandlerInfo.(PojoMethodMapping.java:543)
at 
org.apache.tomcat.websocket.pojo.PojoMethodMapping.(PojoMethodMapping.java:139)
at 
org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:154)
at 
org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:278)
at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:126)


 From the wiki, Tomcat is supposed to be passing the WebSocket TCK.
Do you have pointers to help?

Thanks




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



Re: TCK Failures on WebSocket

2021-04-08 Thread Jean-Louis MONTEIRO
Thanks. I'll look at how to treat those.

I have 2 more failures under
com.sun.ts.tests.websocket.ee.javax.websocket.session.WSClient

And 2 under
com.sun.ts.tests.websocket.spec.servercontainer.addendpoint.WSClient


But I'll investigate first and reach out if needed.

Le jeu. 8 avr. 2021 à 15:35, Mark Thomas  a écrit :

> On 08/04/2021 14:10, Jean-Louis MONTEIRO wrote:
> > Hi,
> >
> > I am running WebSocket TCK on TomEE and I'm having some issues.
> > Wondering if I missed some configuration.
> >
> > Essentially the TCK is deploying an application with this class
> >
> https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/OnMessageServerEndpoint.java
> >
> > It fails to deploy
>
> That is expected. From memory all the ...negdep... tests are expected to
> fail deployment.
>
> Mark
>
>
> >
> > Caused by: jakarta.websocket.DeploymentException: De multiples
> > paramètres de message sont présents sur la méthode [echo] de la classe
> >
> [com.sun.ts.tests.websocket.negdep.onmessage.srv.binarybytebufferint.OnMessageServerEndpoint]
> > qui a été annotée avec OnMessage
> > at
> org.apache.tomcat.websocket.pojo.PojoMethodMapping$MessageHandlerInfo.(PojoMethodMapping.java:543)
> > at
> org.apache.tomcat.websocket.pojo.PojoMethodMapping.(PojoMethodMapping.java:139)
> > at
> org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:154)
> > at
> org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:278)
> > at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:126)
> >
> >
> >  From the wiki, Tomcat is supposed to be passing the WebSocket TCK.
> > Do you have pointers to help?
> >
> > Thanks
> >
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

-- 
Jean-Louis


Re: Jakarta EE - JASPIC TCK (nightly)

2021-04-08 Thread Jean-Louis MONTEIRO
Small update ...

I sent some PRs

https://github.com/eclipse-ee4j/jakartaee-tck/pull/706
https://github.com/eclipse-ee4j/jakartaee-tck/pull/707

When this gets merged, we are 100% coverage.
Tomcat 10.x JASPIC implementation is Jakarta EE 9.1 compatible



Le jeu. 12 nov. 2020 à 19:30, Jean-Louis MONTEIRO  a
écrit :

> Hi,
>
> Bumping this thread up. Sorry for the late reply. Been very busy getting
> Jakarta EE 9 out. Ballot if open till next Friday, so back into this issue.
>
> I created 2 tickets regarding JASPIC and I need to open another one for
> the issue discussed in this thread.
>
> https://github.com/eclipse-ee4j/jakartaee-tck/issues/570
> https://github.com/eclipse-ee4j/jakartaee-tck/issues/571
>
> I agree we need to clarify this part, as it looks most likely like a TCK
> bug.
> Anyway, thanks for the thoughts.
>
>
> Le jeu. 23 juil. 2020 à 16:18, Mark Thomas  a écrit :
>
>> Comments in line.
>>
>> On 22/07/2020 10:19, Jean-Louis MONTEIRO wrote:
>> > Hi,
>> >
>> > Small update on the progress.
>> > Passed: 52 and Failed: 9
>> >
>> > I had a lot of random passed/failed for quite a while and finally found
>> > the reason yesterday.
>>
>> I took a look at running these myself for Tomcat. There is a lot of
>> fiddly setup required. I may come back to this but for now I have other
>> priorities.
>>
>> > I'd be interested in having some thoughts
>> >
>> > AuthenticatorBase uses by default CallbackHandlerImpl
>> >
>> > The CallbackHandlerImpl will create the GenericPrincipal for the subject
>> > based on the supported callbacks (CallerPrincipalCallback
>> > and GroupPrincipalCallback).
>> >
>> > The AuthenticatorBase will pull the GenericPrincipal from the subject
>> > and do the register.
>> >
>> > Long story short, the TCK calls the CallbackHandlerImpl twice with the
>> > CallerCallback and another time with CallerCallback + GroupCallback. We
>> > end up having 2 GenericPrincipal in the subject, one with the name only
>> > and another one with the name and roles.
>> >
>> > JASPIC
>> > TCK
>> https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jaspic/tssv/module/servlet/TSServerAuthModule.java#L371
>> >
>> > See
>> https://github.com/apache/tomcat/blob/master/java/org/apache/catalina/authenticator/jaspic/CallbackHandlerImpl.java#L96
>> >
>> > Issue is that AuthenticatorBase pulls the first one available.
>> > See
>> https://github.com/apache/tomcat/blob/master/java/org/apache/catalina/authenticator/AuthenticatorBase.java#L956
>> >
>> > It will randomly pull the GenericPrincipal with the name only or the
>> > GenericPrincipal with the name and the roles.
>>
>> Nice find. That must have been a real pain to track down.
>>
>> I've been reading through the Jakarta Authentication specification (it
>> should be essentially identical to the previous JASPIC spec).
>>
>> From 3.8.3.1
>> 
>> ... handle a CallerPrincipalCallback using the clientSubject as argument
>> to the callback. If more than one module of a context uses the
>> CallbackHandler to handle this callback, the context is responsible for
>> coordinating the calls such that the appropriate caller principal value
>> is established.
>> 
>>
>> context here is referring to ServerAuthContext.
>>
>> I think, in this case, the ServerAuthContext is being provided by the
>> TCK so my first impression is that this is a TCK bug.
>>
>> I think this is worth raising on the Jakarta Authentication mailing lists.
>>
>> > I did a fork in TomEE of the CallbackHandlerImpl to merge the
>> > GenericPrincipal in the name is the same and switched the
>> > CallbackHandlerImpl class in the BasicAuthenticator valve.
>>
>> Yes, that is the same solution I thought of. Rather than add the newly
>> created GenericPrincipal to the Subject's private credentials, see if
>> the new GenericPrincipal has the same name as an existing
>> GenericPrincipal and if it does merge them.
>>
>> I'm not sure that would be safe to do in the general case though.
>>
>> Mark
>>
>>
>> >
>> > Hope it's more or less clear ;-)
>> > Some thoughts would be very helpfup
>> >
>> >
>> > Le ven. 17 juil. 2020 à 18:21, Mark Thomas > > > a écrit :
>> >
>> > On 17/07/2020 16:56, Jean-Louis MONTEIRO wrote:
>> > > Hi,
>> > >
>> > > Following up on this thread.
>> > > Pretty old I know. Haven't seen more recent topics on JASPIC and
>> > Jakarta
>> > > EE TCK.
>> > >
>> > > I tried to invest some time in TomEE to run the JASPIC TCK which
>> is
>> > > fully relying on Tomcat.
>> > > I have counted 68 tests under the package com.sun.ts.tests.jaspic
>> > >
>> > > The wiki says 100+ so dunno where I'm missing some.
>> > >
>> > > Long story short, after some time configuring the thing, I've got
>> > >
>> > > Passed: 38
>> > > Failed: 30
>> > >
>> > > Anyone looked at it already since Feb 2019?
>> >
>> > I'm probably the most likely candidate and I haven't looked at it.
>> >
>> > Mark

Re: TCK Failures on WebSocket

2021-04-08 Thread Konstantin Kolinko
чт, 8 апр. 2021 г. в 16:10, Jean-Louis MONTEIRO :
>
> Hi,
>
> I am running WebSocket TCK on TomEE and I'm having some issues.
> Wondering if I missed some configuration.
>
> Essentially the TCK is deploying an application with this class
> https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/OnMessageServerEndpoint.java
>
> It fails to deploy
>
> Caused by: jakarta.websocket.DeploymentException: De multiples
> paramètres de message sont présents sur la méthode [echo] de la classe
> [com.sun.ts.tests.websocket.negdep.onmessage.srv.binarybytebufferint.OnMessageServerEndpoint]
> qui a été annotée avec OnMessage
>at 
> org.apache.tomcat.websocket.pojo.PojoMethodMapping$MessageHandlerInfo.(PojoMethodMapping.java:543)
>at 
> org.apache.tomcat.websocket.pojo.PojoMethodMapping.(PojoMethodMapping.java:139)
>at 
> org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:154)
>at 
> org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:278)
>at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:126)
>
>
> From the wiki, Tomcat is supposed to be passing the WebSocket TCK.
> Do you have pointers to help?

1. Your link above are for class in package "nomoreendpoints".

2. but the package name mentioned in the message is "*.binarybytebufferint.*".

https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/OnMessageServerEndpoint.java

https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarybytebufferint/OnMessageServerEndpoint.java

Either way, both classes are annotated with
"@ServerEndpoint("/invalid")" and that path suggests that they are
expected to fail.


WebSocket spec (1.1) says that the requirements for methods annotated
with @OnMessage are stated in javadoc for that annotation.

https://cwiki.apache.org/confluence/display/TOMCAT/Specifications#Specifications-JavaAPIforWebSocket
https://docs.oracle.com/javaee/7/api/javax/websocket/OnMessage.html


Each websocket endpoint may only have one message handling method for
each of the native websocket message formats: text, binary and pong.


The class in package "nomoreendpoints":
- It has two methods to handle text messages (full vs partial). It is
not allowed.

The class in package "binarybytebufferint":
- Invalid parameters to handle partial binary messages. (expected:
ByteBuffer + boolean, actual: ByteBuffer + int).

Best regards,
Konstantin Kolinko

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



Re: TCK Failures on WebSocket

2021-04-08 Thread Jean-Louis MONTEIRO
That is in line with the "negdep" sub package Mark mentioned.
I will need to work to exclude the deployment failures in this situation.

Thanks a lot for the information

Le jeu. 8 avr. 2021 à 15:43, Konstantin Kolinko  a
écrit :

> чт, 8 апр. 2021 г. в 16:10, Jean-Louis MONTEIRO :
> >
> > Hi,
> >
> > I am running WebSocket TCK on TomEE and I'm having some issues.
> > Wondering if I missed some configuration.
> >
> > Essentially the TCK is deploying an application with this class
> >
> https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/OnMessageServerEndpoint.java
> >
> > It fails to deploy
> >
> > Caused by: jakarta.websocket.DeploymentException: De multiples
> > paramètres de message sont présents sur la méthode [echo] de la classe
> >
> [com.sun.ts.tests.websocket.negdep.onmessage.srv.binarybytebufferint.OnMessageServerEndpoint]
> > qui a été annotée avec OnMessage
> >at
> org.apache.tomcat.websocket.pojo.PojoMethodMapping$MessageHandlerInfo.(PojoMethodMapping.java:543)
> >at
> org.apache.tomcat.websocket.pojo.PojoMethodMapping.(PojoMethodMapping.java:139)
> >at
> org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:154)
> >at
> org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:278)
> >at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:126)
> >
> >
> > From the wiki, Tomcat is supposed to be passing the WebSocket TCK.
> > Do you have pointers to help?
>
> 1. Your link above are for class in package "nomoreendpoints".
>
> 2. but the package name mentioned in the message is
> "*.binarybytebufferint.*".
>
>
> https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/OnMessageServerEndpoint.java
>
>
> https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarybytebufferint/OnMessageServerEndpoint.java
>
> Either way, both classes are annotated with
> "@ServerEndpoint("/invalid")" and that path suggests that they are
> expected to fail.
>
>
> WebSocket spec (1.1) says that the requirements for methods annotated
> with @OnMessage are stated in javadoc for that annotation.
>
>
> https://cwiki.apache.org/confluence/display/TOMCAT/Specifications#Specifications-JavaAPIforWebSocket
> https://docs.oracle.com/javaee/7/api/javax/websocket/OnMessage.html
>
> 
> Each websocket endpoint may only have one message handling method for
> each of the native websocket message formats: text, binary and pong.
> 
>
> The class in package "nomoreendpoints":
> - It has two methods to handle text messages (full vs partial). It is
> not allowed.
>
> The class in package "binarybytebufferint":
> - Invalid parameters to handle partial binary messages. (expected:
> ByteBuffer + boolean, actual: ByteBuffer + int).
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

-- 
Jean-Louis


[tomcat] branch master updated: Remove unnecessary code

2021-04-08 Thread markt
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


The following commit(s) were added to refs/heads/master by this push:
 new 6f0573b  Remove unnecessary code
6f0573b is described below

commit 6f0573b0f42f00ed23e2c2f44925fc148bfdad5b
Author: Mark Thomas 
AuthorDate: Thu Apr 8 14:50:53 2021 +0100

Remove unnecessary code

If an attribute is not a named attribute then it must appear in an XML
element in the form attributeName="attributeValue". There is no way to
construct such an XML attribute such that the attributeValue is null. I
have also checked all the possible code paths to this method and I could
not find any where an attribute that was not a named attribute could
have a null value.
---
 java/org/apache/jasper/compiler/Generator.java | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 07de664..44227d5 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -960,9 +960,6 @@ class Generator {
 private String attributeValue(Node.JspAttribute attr, boolean encode,
 Class expectedType) {
 String v = attr.getValue();
-if (!attr.isNamedAttribute() && (v == null))
-return "";
-
 if (attr.isExpression()) {
 if (encode) {
 return 
"org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(String.valueOf("

-
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 (59339a4 -> 8690607)

2021-04-08 Thread markt
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 59339a4  Better align 10.0.x/9.0.x/8.5.x
 add 8690607  Remove unnecessary code

No new revisions were added by this update.

Summary of changes:
 java/org/apache/jasper/compiler/Generator.java | 3 ---
 1 file changed, 3 deletions(-)

-
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: Remove unnecessary code

2021-04-08 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 da3c216  Remove unnecessary code
da3c216 is described below

commit da3c216bad8b8a37e97d4ae1cddb91046be1c8c2
Author: Mark Thomas 
AuthorDate: Thu Apr 8 14:50:53 2021 +0100

Remove unnecessary code

If an attribute is not a named attribute then it must appear in an XML
element in the form attributeName="attributeValue". There is no way to
construct such an XML attribute such that the attributeValue is null. I
have also checked all the possible code paths to this method and I could
not find any where an attribute that was not a named attribute could
have a null value.
---
 java/org/apache/jasper/compiler/Generator.java | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 37f2588..d0beebc 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -956,9 +956,6 @@ class Generator {
 private String attributeValue(Node.JspAttribute attr, boolean encode,
 Class expectedType) {
 String v = attr.getValue();
-if (!attr.isNamedAttribute() && (v == null))
-return "";
-
 if (attr.isExpression()) {
 if (encode) {
 return 
"org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(String.valueOf("

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



Re: Jakarta EE - JASPIC TCK (nightly)

2021-04-08 Thread Mark Thomas

On 08/04/2021 14:41, Jean-Louis MONTEIRO wrote:

Small update ...

I sent some PRs

https://github.com/eclipse-ee4j/jakartaee-tck/pull/706
https://github.com/eclipse-ee4j/jakartaee-tck/pull/707

When this gets merged, we are 100% coverage.
Tomcat 10.x JASPIC implementation is Jakarta EE 9.1 compatible


Excellent! That is good news.

Mark

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



[Bug 65224] New: JNDIRealm doesn't escape filters containing username

2021-04-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65224

Bug ID: 65224
   Summary: JNDIRealm doesn't escape filters containing username
   Product: Tomcat 8
   Version: 8.5.65
  Hardware: PC
OS: Mac OS X 10.1
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: ilja.far...@sap.com
  Target Milestone: 

Bug 23190 fixes similar issue. But the methods JNDIRealm.getUserBySearch() and
getUserByPattern() still use unescaped filters. The already available
doRFC2254Encoding() would fix the issue.


In follow use case it is even a security issue. 
Tomcat runs with LockoutRealm over JNDI Realm and only one user Hugo on
configured userBase. Client can logon with Hugo/ as well as with
H*/. It works always if ldap search returns exactly one entry for the
query.

Bad client can outflank the lockout configuration with
H*/, H**/ etc. 

Besides of lockout troubles, I don't think, it is acceptable to allow logon for
H* instead of real user Hugo.

The issue exists actually in all (current) tomcat versions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Remove unnecessary code

2021-04-08 Thread markt
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


The following commit(s) were added to refs/heads/master by this push:
 new adcc949  Remove unnecessary code
adcc949 is described below

commit adcc9495fe0158dbac72b81f5c4c6da95e9974ee
Author: Mark Thomas 
AuthorDate: Thu Apr 8 15:50:25 2021 +0100

Remove unnecessary code

Node.ELExpression instances are not created if pageInfo.isELIgnored is
true. It seems likely this code predates the refactoring (many years
ago) that switched to parsing in two passes. The first pass parses just
the directives. The second parses everything given on the basis of the
directives found in the first pass.
---
 java/org/apache/jasper/compiler/Generator.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 44227d5..e8ffe88 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1051,16 +1051,12 @@ class Generator {
 @Override
 public void visit(Node.ELExpression n) throws JasperException {
 n.setBeginJavaLine(out.getJavaLine());
-if (!pageInfo.isELIgnored() && (n.getEL() != null)) {
-out.printil("out.write("
-+ elInterpreter.interpreterCall(ctxt, this.isTagFile,
-n.getType() + "{" + n.getText() + "}",
-String.class, n.getEL().getMapName()) +
-");");
-} else {
-out.printil("out.write("
-+ quote(n.getType() + "{" + n.getText() + "}") + ");");
-}
+System.out.println("[" + pageInfo.isELIgnored() + "] [" + 
n.getEL() + "]");
+out.printil("out.write("
++ elInterpreter.interpreterCall(ctxt, this.isTagFile,
+n.getType() + "{" + n.getText() + "}",
+String.class, n.getEL().getMapName()) +
+");");
 n.setEndJavaLine(out.getJavaLine());
 }
 

-
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: Remove unnecessary code

2021-04-08 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 2628a9b  Remove unnecessary code
2628a9b is described below

commit 2628a9b331b9b1ce220c6b17eb48c600f6e76647
Author: Mark Thomas 
AuthorDate: Thu Apr 8 15:50:25 2021 +0100

Remove unnecessary code

Node.ELExpression instances are not created if pageInfo.isELIgnored is
true. It seems likely this code predates the refactoring (many years
ago) that switched to parsing in two passes. The first pass parses just
the directives. The second parses everything given on the basis of the
directives found in the first pass.
---
 java/org/apache/jasper/compiler/Generator.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 43068f4..389159f 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1064,16 +1064,12 @@ class Generator {
 @Override
 public void visit(Node.ELExpression n) throws JasperException {
 n.setBeginJavaLine(out.getJavaLine());
-if (!pageInfo.isELIgnored() && (n.getEL() != null)) {
-out.printil("out.write("
-+ elInterpreter.interpreterCall(ctxt, this.isTagFile,
-n.getType() + "{" + n.getText() + "}",
-String.class, n.getEL().getMapName()) +
-");");
-} else {
-out.printil("out.write("
-+ quote(n.getType() + "{" + n.getText() + "}") + ");");
-}
+System.out.println("[" + pageInfo.isELIgnored() + "] [" + 
n.getEL() + "]");
+out.printil("out.write("
++ elInterpreter.interpreterCall(ctxt, this.isTagFile,
+n.getType() + "{" + n.getText() + "}",
+String.class, n.getEL().getMapName()) +
+");");
 n.setEndJavaLine(out.getJavaLine());
 }
 

-
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: Remove unnecessary code

2021-04-08 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 8f2a769  Remove unnecessary code
8f2a769 is described below

commit 8f2a7693f989875cd8517ee898a21f646715b6d0
Author: Mark Thomas 
AuthorDate: Thu Apr 8 15:50:25 2021 +0100

Remove unnecessary code

Node.ELExpression instances are not created if pageInfo.isELIgnored is
true. It seems likely this code predates the refactoring (many years
ago) that switched to parsing in two passes. The first pass parses just
the directives. The second parses everything given on the basis of the
directives found in the first pass.
---
 java/org/apache/jasper/compiler/Generator.java | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index d0beebc..a61efe6 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1047,16 +1047,12 @@ class Generator {
 @Override
 public void visit(Node.ELExpression n) throws JasperException {
 n.setBeginJavaLine(out.getJavaLine());
-if (!pageInfo.isELIgnored() && (n.getEL() != null)) {
-out.printil("out.write("
-+ elInterpreter.interpreterCall(ctxt, this.isTagFile,
-n.getType() + "{" + n.getText() + "}",
-String.class, n.getEL().getMapName()) +
-");");
-} else {
-out.printil("out.write("
-+ quote(n.getType() + "{" + n.getText() + "}") + ");");
-}
+System.out.println("[" + pageInfo.isELIgnored() + "] [" + 
n.getEL() + "]");
+out.printil("out.write("
++ elInterpreter.interpreterCall(ctxt, this.isTagFile,
+n.getType() + "{" + n.getText() + "}",
+String.class, n.getEL().getMapName()) +
+");");
 n.setEndJavaLine(out.getJavaLine());
 }
 

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



[tomcat] branch master updated: Update changelog

2021-04-08 Thread markt
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


The following commit(s) were added to refs/heads/master by this push:
 new ff2c4e7  Update changelog
ff2c4e7 is described below

commit ff2c4e767d225e42580b0897e509fcde1a56229d
Author: Mark Thomas 
AuthorDate: Thu Apr 8 15:55:23 2021 +0100

Update changelog
---
 webapps/docs/changelog.xml | 8 
 1 file changed, 8 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1688ef8..8e002bd 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,6 +104,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Review code used to generate Java source from JSPs and tags and remove
+code found to be unnecessary. (markt)
+  
+
+  
   
 
   

-
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 (2628a9b -> 1f07c49)

2021-04-08 Thread markt
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 2628a9b  Remove unnecessary code
 add 1f07c49  Update changelog

No new revisions were added by this update.

Summary of changes:
 webapps/docs/changelog.xml | 8 
 1 file changed, 8 insertions(+)

-
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: Update changelog

2021-04-08 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 798249a  Update changelog
798249a is described below

commit 798249a8d7d21d9aae58662863541674e7be53de
Author: Mark Thomas 
AuthorDate: Thu Apr 8 15:55:23 2021 +0100

Update changelog
---
 webapps/docs/changelog.xml | 8 
 1 file changed, 8 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 723c4fa..07d4857 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,6 +104,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Review code used to generate Java source from JSPs and tags and remove
+code found to be unnecessary. (markt)
+  
+
+  
   
 
   

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



[tomcat] branch master updated: Remove unnecessary code. parent is always non-null

2021-04-08 Thread markt
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


The following commit(s) were added to refs/heads/master by this push:
 new aec7797  Remove unnecessary code. parent is always non-null
aec7797 is described below

commit aec77974a09913d1440df5eb26b4aca090afc4c3
Author: Mark Thomas 
AuthorDate: Thu Apr 8 17:54:47 2021 +0100

Remove unnecessary code. parent is always non-null
---
 java/org/apache/jasper/compiler/Generator.java | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index e8ffe88..bf25b34 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1104,12 +1104,9 @@ class Generator {
  * a Named Attribute (), generate the code to 
evaluate
  * those bodies first.
  * 
- * If parent is null, simply returns.
+ * {@code parent} is assumed to be non-null
  */
 private void prepareParams(Node parent) throws JasperException {
-if (parent == null)
-return;
-
 Node.Nodes subelements = parent.getBody();
 if (subelements != null) {
 for (int i = 0; i < subelements.size(); i++) {

-
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: Remove unnecessary code. parent is always non-null

2021-04-08 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 b74ac4f  Remove unnecessary code. parent is always non-null
b74ac4f is described below

commit b74ac4f36a492f4a1dc84919d0ac64de09aec650
Author: Mark Thomas 
AuthorDate: Thu Apr 8 17:54:47 2021 +0100

Remove unnecessary code. parent is always non-null
---
 java/org/apache/jasper/compiler/Generator.java | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 389159f..3570e57 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1117,12 +1117,9 @@ class Generator {
  * a Named Attribute (), generate the code to 
evaluate
  * those bodies first.
  * 
- * If parent is null, simply returns.
+ * {@code parent} is assumed to be non-null
  */
 private void prepareParams(Node parent) throws JasperException {
-if (parent == null)
-return;
-
 Node.Nodes subelements = parent.getBody();
 if (subelements != null) {
 for (int i = 0; i < subelements.size(); i++) {

-
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: Remove unnecessary code. parent is always non-null

2021-04-08 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 d32f3ee  Remove unnecessary code. parent is always non-null
d32f3ee is described below

commit d32f3ee4c964f73cf20bf01dbf05678250de88fb
Author: Mark Thomas 
AuthorDate: Thu Apr 8 17:54:47 2021 +0100

Remove unnecessary code. parent is always non-null
---
 java/org/apache/jasper/compiler/Generator.java | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index a61efe6..ee44577 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1100,12 +1100,9 @@ class Generator {
  * a Named Attribute (), generate the code to 
evaluate
  * those bodies first.
  * 
- * If parent is null, simply returns.
+ * {@code parent} is assumed to be non-null
  */
 private void prepareParams(Node parent) throws JasperException {
-if (parent == null)
-return;
-
 Node.Nodes subelements = parent.getBody();
 if (subelements != null) {
 for (int i = 0; i < subelements.size(); i++) {

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



[tomcat] branch master updated (aec7797 -> 7b721d6)

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

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


from aec7797  Remove unnecessary code. parent is always non-null
 new 21fadbe  Remove debug code
 new 7b721d6  Remove unnecessary code

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/compiler/Generator.java | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

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



[tomcat] 02/02: Remove unnecessary code

2021-04-08 Thread markt
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 7b721d64754cc02031aa0a967e3ef615e0738b74
Author: Mark Thomas 
AuthorDate: Thu Apr 8 18:50:03 2021 +0100

Remove unnecessary code

Body of parent always consists of NodeParamAction instances
---
 java/org/apache/jasper/compiler/Generator.java | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 35e1dc7..7af2ccc 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1110,14 +1110,14 @@ class Generator {
 if (subelements != null) {
 for (int i = 0; i < subelements.size(); i++) {
 Node n = subelements.getNode(i);
-if (n instanceof Node.ParamAction) {
-Node.Nodes paramSubElements = n.getBody();
-for (int j = 0; (paramSubElements != null)
-&& (j < paramSubElements.size()); j++) {
-Node m = paramSubElements.getNode(j);
-if (m instanceof Node.NamedAttribute) {
-
generateNamedAttributeValue((Node.NamedAttribute) m);
-}
+// Validation during parsing ensures n is an instance of
+// Node.ParamAction
+Node.Nodes paramSubElements = n.getBody();
+for (int j = 0; (paramSubElements != null)
+&& (j < paramSubElements.size()); j++) {
+Node m = paramSubElements.getNode(j);
+if (m instanceof Node.NamedAttribute) {
+generateNamedAttributeValue((Node.NamedAttribute) 
m);
 }
 }
 }

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



[tomcat] 01/02: Remove debug code

2021-04-08 Thread markt
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 21fadbe02c3925f82754b44b602c1e0d64fcf361
Author: Mark Thomas 
AuthorDate: Thu Apr 8 18:44:42 2021 +0100

Remove debug code
---
 java/org/apache/jasper/compiler/Generator.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index bf25b34..35e1dc7 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1051,7 +1051,6 @@ class Generator {
 @Override
 public void visit(Node.ELExpression n) throws JasperException {
 n.setBeginJavaLine(out.getJavaLine());
-System.out.println("[" + pageInfo.isELIgnored() + "] [" + 
n.getEL() + "]");
 out.printil("out.write("
 + elInterpreter.interpreterCall(ctxt, this.isTagFile,
 n.getType() + "{" + n.getText() + "}",

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



[tomcat] 01/02: Remove debug code

2021-04-08 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

commit 0347c445c3a93f597ba479c275ac062c4930c78a
Author: Mark Thomas 
AuthorDate: Thu Apr 8 18:44:42 2021 +0100

Remove debug code
---
 java/org/apache/jasper/compiler/Generator.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 3570e57..14cc74a 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1064,7 +1064,6 @@ class Generator {
 @Override
 public void visit(Node.ELExpression n) throws JasperException {
 n.setBeginJavaLine(out.getJavaLine());
-System.out.println("[" + pageInfo.isELIgnored() + "] [" + 
n.getEL() + "]");
 out.printil("out.write("
 + elInterpreter.interpreterCall(ctxt, this.isTagFile,
 n.getType() + "{" + n.getText() + "}",

-
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 (b74ac4f -> b36454d)

2021-04-08 Thread markt
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 b74ac4f  Remove unnecessary code. parent is always non-null
 new 0347c44  Remove debug code
 new b36454d  Remove unnecessary code

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/compiler/Generator.java | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

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



[tomcat] 02/02: Remove unnecessary code

2021-04-08 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

commit b36454d68897856a3a1d62a6e4cecb529c4cb0ab
Author: Mark Thomas 
AuthorDate: Thu Apr 8 18:50:03 2021 +0100

Remove unnecessary code

Body of parent always consists of NodeParamAction instances
---
 java/org/apache/jasper/compiler/Generator.java | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 14cc74a..e8c4af0 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1123,14 +1123,14 @@ class Generator {
 if (subelements != null) {
 for (int i = 0; i < subelements.size(); i++) {
 Node n = subelements.getNode(i);
-if (n instanceof Node.ParamAction) {
-Node.Nodes paramSubElements = n.getBody();
-for (int j = 0; (paramSubElements != null)
-&& (j < paramSubElements.size()); j++) {
-Node m = paramSubElements.getNode(j);
-if (m instanceof Node.NamedAttribute) {
-
generateNamedAttributeValue((Node.NamedAttribute) m);
-}
+// Validation during parsing ensures n is an instance of
+// Node.ParamAction
+Node.Nodes paramSubElements = n.getBody();
+for (int j = 0; (paramSubElements != null)
+&& (j < paramSubElements.size()); j++) {
+Node m = paramSubElements.getNode(j);
+if (m instanceof Node.NamedAttribute) {
+generateNamedAttributeValue((Node.NamedAttribute) 
m);
 }
 }
 }

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



[tomcat] 01/02: Remove debug code

2021-04-08 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

commit 2771fe8c3be8c3f07ab7aa3abf08f3d53bdbd8a0
Author: Mark Thomas 
AuthorDate: Thu Apr 8 18:44:42 2021 +0100

Remove debug code
---
 java/org/apache/jasper/compiler/Generator.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index ee44577..2717ffc 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1047,7 +1047,6 @@ class Generator {
 @Override
 public void visit(Node.ELExpression n) throws JasperException {
 n.setBeginJavaLine(out.getJavaLine());
-System.out.println("[" + pageInfo.isELIgnored() + "] [" + 
n.getEL() + "]");
 out.printil("out.write("
 + elInterpreter.interpreterCall(ctxt, this.isTagFile,
 n.getType() + "{" + n.getText() + "}",

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



[tomcat] 02/02: Remove unnecessary code

2021-04-08 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

commit 9b942960afc36893adb99b36c8251bcb10068bfe
Author: Mark Thomas 
AuthorDate: Thu Apr 8 18:50:03 2021 +0100

Remove unnecessary code

Body of parent always consists of NodeParamAction instances
---
 java/org/apache/jasper/compiler/Generator.java | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 2717ffc..638dac4 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -1106,14 +1106,14 @@ class Generator {
 if (subelements != null) {
 for (int i = 0; i < subelements.size(); i++) {
 Node n = subelements.getNode(i);
-if (n instanceof Node.ParamAction) {
-Node.Nodes paramSubElements = n.getBody();
-for (int j = 0; (paramSubElements != null)
-&& (j < paramSubElements.size()); j++) {
-Node m = paramSubElements.getNode(j);
-if (m instanceof Node.NamedAttribute) {
-
generateNamedAttributeValue((Node.NamedAttribute) m);
-}
+// Validation during parsing ensures n is an instance of
+// Node.ParamAction
+Node.Nodes paramSubElements = n.getBody();
+for (int j = 0; (paramSubElements != null)
+&& (j < paramSubElements.size()); j++) {
+Node m = paramSubElements.getNode(j);
+if (m instanceof Node.NamedAttribute) {
+generateNamedAttributeValue((Node.NamedAttribute) 
m);
 }
 }
 }

-
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 (d32f3ee -> 9b94296)

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

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


from d32f3ee  Remove unnecessary code. parent is always non-null
 new 2771fe8  Remove debug code
 new 9b94296  Remove unnecessary code

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/compiler/Generator.java | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

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



[Bug 65226] New: The StandardJarScanner extract wrong jar name and cause duplicate jar scan

2021-04-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65226

Bug ID: 65226
   Summary: The StandardJarScanner extract wrong jar name and
cause duplicate jar scan
   Product: Tomcat 7
   Version: 7.0.106
  Hardware: All
OS: All
Status: NEW
  Severity: major
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: phoenix...@gmail.com
  Target Milestone: ---

The StandardJarScanner is used to process when start scan the WebFragment. It
first scan for all jars in WEB-INF/lib and then scan the whole classpath from
all classloader.
The first scan went through correctly
(https://github.com/apache/tomcat/blob/7.0.x/java/org/apache/tomcat/util/scan/StandardJarScanner.java#L164).

The second scan also went across the WEB-INF/lib and use this condition:
https://github.com/apache/tomcat/blob/7.0.x/java/org/apache/tomcat/util/scan/StandardJarScanner.java#L229-L230
to determine if this jar is already scanned.

The problem happens when in the jar path, there is a ".jar" inside it, for
example:
file:/Users/lynx/myproject/.jarvis/jarvisproject/WEB-INF/lib/mylibrary.jar
(url.toString() form)

The root cause I believe is due to this line:
https://github.com/apache/tomcat/blob/7.0.x/java/org/apache/tomcat/util/scan/StandardJarScanner.java#L362,
which only scan for the ".jar" suffix from the first found and return the
index. There is some path in my server that contains a ".jar" in the path of a
jar and breaks this logic.

Due to the condition doesn't met in StandardJarScanner, the webfragment is
being scanned twice and cause a validation failure with some stacktrace like
following:
```
  INFO | jvm 1 | 2021/04/08 15:46:00 | Caused by:
java.lang.IllegalArgumentException: More than one fragment with the name
[myfragment] was found. This is not legal with relative ordering. See section
8.2.2 2c of the Servlet specification for details. Consider using absolute
ordering.
INFO | jvm 1 | 2021/04/08 15:46:00 | at
org.apache.catalina.deploy.WebXml.orderWebFragments(WebXml.java:2338)
INFO | jvm 1 | 2021/04/08 15:46:00 | at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1228)
INFO | jvm 1 | 2021/04/08 15:46:00 | at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:888)
INFO | jvm 1 | 2021/04/08 15:46:00 | at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
INFO | jvm 1 | 2021/04/08 15:46:00 | at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
INFO | jvm 1 | 2021/04/08 15:46:00 | at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5536)
INFO | jvm 1 | 2021/04/08 15:46:00 | at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
```

I would think a "lastIndexOf" is better fit but I'm not sure if this can cover
all the cases.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org