[tomcat] branch 8.5.x updated: BZ-64797 Aligned Host-Manager manager.xml with Manager context.xml

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 92b6b37  BZ-64797 Aligned Host-Manager manager.xml with Manager 
context.xml
92b6b37 is described below

commit 92b6b374f66c533e26914d05db5f841a9039fcf1
Author: Igal Sapir 
AuthorDate: Tue Oct 20 22:57:19 2020 -0700

BZ-64797 Aligned Host-Manager manager.xml with Manager context.xml
---
 RUNNING.txt   | 1 +
 java/org/apache/catalina/manager/host/HostManagerServlet.java | 2 +-
 webapps/docs/changelog.xml| 4 
 webapps/host-manager/{ => WEB-INF}/manager.xml| 6 +-
 4 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index 1f79a15..4ed846f 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -312,6 +312,7 @@ The file will look like the following:
 antiResourceLocking="false" privileged="true" >
 
+
   
 
 See Deployer chapter in User Guide and Context and Host chapters in the
diff --git a/java/org/apache/catalina/manager/host/HostManagerServlet.java 
b/java/org/apache/catalina/manager/host/HostManagerServlet.java
index 9fb2fe2..df1c16f 100644
--- a/java/org/apache/catalina/manager/host/HostManagerServlet.java
+++ b/java/org/apache/catalina/manager/host/HostManagerServlet.java
@@ -394,7 +394,7 @@ public class HostManagerServlet
 "hostManagerServlet.configBaseCreateFail", name));
 return;
 }
-try (InputStream is = 
getServletContext().getResourceAsStream("/manager.xml")) {
+try (InputStream is = 
getServletContext().getResourceAsStream("/WEB-INF/manager.xml")) {
 Path dest = (new File(configBaseFile, "manager.xml")).toPath();
 Files.copy(is, dest);
 } catch (IOException e) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d4c8583..606603d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -98,6 +98,10 @@
   
 64799: Added missing resources to host-manager web app. 
(isapir)
   
+  
+64797: Align manager.xml template file in Host-Manager with
+context.xml of real Manager web application. (isapir)
+  
 
   
 
diff --git a/webapps/host-manager/manager.xml 
b/webapps/host-manager/WEB-INF/manager.xml
similarity index 69%
rename from webapps/host-manager/manager.xml
rename to webapps/host-manager/WEB-INF/manager.xml
index 2510acb..a26dca6 100644
--- a/webapps/host-manager/manager.xml
+++ b/webapps/host-manager/WEB-INF/manager.xml
@@ -22,5 +22,9 @@
 -->
 
-
+  
+  
+  
 


-
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: BZ-64797 Aligned Host-Manager manager.xml with Manager context.xml

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 e3aa8d0  BZ-64797 Aligned Host-Manager manager.xml with Manager 
context.xml
e3aa8d0 is described below

commit e3aa8d0b83da98ededaf8a30d721131926239891
Author: Igal Sapir 
AuthorDate: Tue Oct 20 22:54:00 2020 -0700

BZ-64797 Aligned Host-Manager manager.xml with Manager context.xml
---
 RUNNING.txt   | 1 +
 java/org/apache/catalina/manager/host/HostManagerServlet.java | 2 +-
 webapps/docs/changelog.xml| 4 
 webapps/host-manager/{ => WEB-INF}/manager.xml| 6 +-
 4 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index 02283a3..a4b2d76 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -312,6 +312,7 @@ The file will look like the following:
 antiResourceLocking="false" privileged="true" >
 
+
   
 
 See Deployer chapter in User Guide and Context and Host chapters in the
diff --git a/java/org/apache/catalina/manager/host/HostManagerServlet.java 
b/java/org/apache/catalina/manager/host/HostManagerServlet.java
index a1e10da..f25dbff 100644
--- a/java/org/apache/catalina/manager/host/HostManagerServlet.java
+++ b/java/org/apache/catalina/manager/host/HostManagerServlet.java
@@ -394,7 +394,7 @@ public class HostManagerServlet
 "hostManagerServlet.configBaseCreateFail", name));
 return;
 }
-try (InputStream is = 
getServletContext().getResourceAsStream("/manager.xml")) {
+try (InputStream is = 
getServletContext().getResourceAsStream("/WEB-INF/manager.xml")) {
 Path dest = (new File(configBaseFile, "manager.xml")).toPath();
 Files.copy(is, dest);
 } catch (IOException e) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index db32630..85220d4 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -120,6 +120,10 @@
   
 64799: Added missing resources to host-manager web app. 
(isapir)
   
+  
+64797: Align manager.xml template file in Host-Manager with
+context.xml of real Manager web application. (isapir)
+  
 
   
 
diff --git a/webapps/host-manager/manager.xml 
b/webapps/host-manager/WEB-INF/manager.xml
similarity index 69%
rename from webapps/host-manager/manager.xml
rename to webapps/host-manager/WEB-INF/manager.xml
index 2510acb..a26dca6 100644
--- a/webapps/host-manager/manager.xml
+++ b/webapps/host-manager/WEB-INF/manager.xml
@@ -22,5 +22,9 @@
 -->
 
-
+  
+  
+  
 


-
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: Added .vscode to .gitignore

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 5fb7e46  Added .vscode to .gitignore
5fb7e46 is described below

commit 5fb7e46c213bfa9171ebb289b93ba5b4f5b14359
Author: Igal Sapir 
AuthorDate: Tue Oct 20 22:44:51 2020 -0700

Added .vscode to .gitignore
---
 .gitignore | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index aa1345f..9202ec7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,9 +27,10 @@ mvn.properties
 .checkstyle
 .classpath
 .fbprefs
+.idea
 .project
 .settings
-.idea
+.vscode
 *.iml
 *.ipr
 *.iws


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



[tomcat] branch 7.0.x updated: Added .vscode to .gitignore

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 0ddfd8a  Added .vscode to .gitignore
0ddfd8a is described below

commit 0ddfd8a06b5af87a6efb6f1c7735adba2b6bfa52
Author: Igal Sapir 
AuthorDate: Tue Oct 20 22:44:51 2020 -0700

Added .vscode to .gitignore
---
 .gitignore | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index aa1345f..9202ec7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,9 +27,10 @@ mvn.properties
 .checkstyle
 .classpath
 .fbprefs
+.idea
 .project
 .settings
-.idea
+.vscode
 *.iml
 *.ipr
 *.iws


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



[GitHub] [tomcat] anilgursel opened a new pull request #371: Call `accept` immediately if connection count is not close to max con…

2020-10-20 Thread GitBox


anilgursel opened a new pull request #371:
URL: https://github.com/apache/tomcat/pull/371


   …nections
   
   Under regular load, we observe NIO2 has better CPU utilization and slightly 
better latency compared to NIO1.  However, under heavy load or during spikes, 
we observed that the 99th percentile latency of NIO2 is significantly worse 
compared to NIO1.   
   
   - We see that the latency is worse compared to NIO1 only for the requests 
that end up establishing a new connection.
   - When `maxKeepAliveRequests=-1`, we do not observe the latency degradation 
with NIO2 at all.  But, we need and use Tomcat’s `maxKeepAliveRequests` 
feature, so setting it to `-1` is not an option.  
   - The problem occurs only during spikes/high load, e.g., maxThreads=40, 
while the concurrent users sending requests is 100.
   - The issue happens only for blocking scenarios, where Tomcat threads are 
blocked during request processing.  When non-blocking programming is used 
(where Tomcat threads are freed quickly), we do not see any degradation 
compared to NIO1.  However, we have many applications that would not be able to 
adopt non-blocking anytime soon.
   
   
   While looking at Tomcat code, we saw that the `accept` is scheduled to be 
run on the thread pool.  Our hypothesis was that this scheduling was causing 
the `accept` to be delayed significantly under heavy load.  So, for a request 
with new connection establishment, it needs to go through the `TaskQueue` 
twice.  So, just for testing purpose we set `maxConnections=-1` to see the 
impact of immediate `accept` call (and in our test the number of concurrent 
connections does not get close to `maxConnections`), we observed that the 99th 
percentile latency problem with NIO2 disappeared.
   
   Accordingly, proposing a change to call `accept` immediately if the number 
of connections are not close to `maxConnections`.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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



[tomcat] branch 7.0.x updated: Updated text per @schultz

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new e727075  Updated text per @schultz
e727075 is described below

commit e72707525fa4657879982d8ede2f21928695bc75
Author: Igal Sapir 
AuthorDate: Tue Oct 20 21:20:14 2020 -0700

Updated text per @schultz
---
 RUNNING.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index b74ab6a..8e9c8ce 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -313,8 +313,8 @@ CATALINA_BASE can be referenced in the XML configuration 
files processed
 by Tomcat as ${catalina.home} and ${catalina.base} respectively.
 
 For example, the standard manager web application can be kept in
-CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
-the following trick:
+CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by copying
+its deployment descriptor into the desired virtual host:
 
  * Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml


-
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: Updated text per @schultz

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 d0dedef  Updated text per @schultz
d0dedef is described below

commit d0dedef4670f15fe94092241cb6fe90c14f241ed
Author: Igal Sapir 
AuthorDate: Tue Oct 20 21:15:02 2020 -0700

Updated text per @schultz
---
 RUNNING.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index b34e1c7..1f79a15 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -297,8 +297,8 @@ CATALINA_BASE can be referenced in the XML configuration 
files processed
 by Tomcat as ${catalina.home} and ${catalina.base} respectively.
 
 For example, the standard manager web application can be kept in
-CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
-the following trick:
+CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by copying
+its deployment descriptor into the desired virtual host:
 
  * Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml


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



[tomcat] branch master updated: Updated text per @schultz

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 647ad9b  Updated text per @schultz
647ad9b is described below

commit 647ad9b641042ccf8cefdcbe6e5ca8900fdf54df
Author: Igal Sapir 
AuthorDate: Tue Oct 20 21:08:53 2020 -0700

Updated text per @schultz
---
 RUNNING.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index 9f9b4b2..a4b2d76 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -297,8 +297,8 @@ CATALINA_BASE can be referenced in the XML configuration 
files processed
 by Tomcat as ${catalina.home} and ${catalina.base} respectively.
 
 For example, the standard manager web application can be kept in
-CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
-the following trick:
+CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by copying
+its deployment descriptor into the desired virtual host:
 
  * Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml


-
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: Updated text per @schultz

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 8bcc845  Updated text per @schultz
8bcc845 is described below

commit 8bcc8453c51166074e81a35cbe9427d5d5f92104
Author: Igal Sapir 
AuthorDate: Tue Oct 20 21:11:32 2020 -0700

Updated text per @schultz
---
 RUNNING.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index c71620b..02283a3 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -297,8 +297,8 @@ CATALINA_BASE can be referenced in the XML configuration 
files processed
 by Tomcat as ${catalina.home} and ${catalina.base} respectively.
 
 For example, the standard manager web application can be kept in
-CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
-the following trick:
+CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by copying
+its deployment descriptor into the desired virtual host:
 
  * Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml


-
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: Updated text per @schultz

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 8bcc845  Updated text per @schultz
8bcc845 is described below

commit 8bcc8453c51166074e81a35cbe9427d5d5f92104
Author: Igal Sapir 
AuthorDate: Tue Oct 20 21:11:32 2020 -0700

Updated text per @schultz
---
 RUNNING.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index c71620b..02283a3 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -297,8 +297,8 @@ CATALINA_BASE can be referenced in the XML configuration 
files processed
 by Tomcat as ${catalina.home} and ${catalina.base} respectively.
 
 For example, the standard manager web application can be kept in
-CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
-the following trick:
+CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by copying
+its deployment descriptor into the desired virtual host:
 
  * Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml


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



[tomcat] branch master updated: Updated text per @schultz

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 647ad9b  Updated text per @schultz
647ad9b is described below

commit 647ad9b641042ccf8cefdcbe6e5ca8900fdf54df
Author: Igal Sapir 
AuthorDate: Tue Oct 20 21:08:53 2020 -0700

Updated text per @schultz
---
 RUNNING.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index 9f9b4b2..a4b2d76 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -297,8 +297,8 @@ CATALINA_BASE can be referenced in the XML configuration 
files processed
 by Tomcat as ${catalina.home} and ${catalina.base} respectively.
 
 For example, the standard manager web application can be kept in
-CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
-the following trick:
+CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by copying
+its deployment descriptor into the desired virtual host:
 
  * Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml


-
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: Updated text per @schultz

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 8bcc845  Updated text per @schultz
8bcc845 is described below

commit 8bcc8453c51166074e81a35cbe9427d5d5f92104
Author: Igal Sapir 
AuthorDate: Tue Oct 20 21:11:32 2020 -0700

Updated text per @schultz
---
 RUNNING.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index c71620b..02283a3 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -297,8 +297,8 @@ CATALINA_BASE can be referenced in the XML configuration 
files processed
 by Tomcat as ${catalina.home} and ${catalina.base} respectively.
 
 For example, the standard manager web application can be kept in
-CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
-the following trick:
+CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by copying
+its deployment descriptor into the desired virtual host:
 
  * Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml


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



[tomcat] branch master updated: Updated text per @schultz

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 647ad9b  Updated text per @schultz
647ad9b is described below

commit 647ad9b641042ccf8cefdcbe6e5ca8900fdf54df
Author: Igal Sapir 
AuthorDate: Tue Oct 20 21:08:53 2020 -0700

Updated text per @schultz
---
 RUNNING.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index 9f9b4b2..a4b2d76 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -297,8 +297,8 @@ CATALINA_BASE can be referenced in the XML configuration 
files processed
 by Tomcat as ${catalina.home} and ${catalina.base} respectively.
 
 For example, the standard manager web application can be kept in
-CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
-the following trick:
+CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by copying
+its deployment descriptor into the desired virtual host:
 
  * Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml


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



[tomcat] branch master updated: Updated text per @schultz

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 647ad9b  Updated text per @schultz
647ad9b is described below

commit 647ad9b641042ccf8cefdcbe6e5ca8900fdf54df
Author: Igal Sapir 
AuthorDate: Tue Oct 20 21:08:53 2020 -0700

Updated text per @schultz
---
 RUNNING.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index 9f9b4b2..a4b2d76 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -297,8 +297,8 @@ CATALINA_BASE can be referenced in the XML configuration 
files processed
 by Tomcat as ${catalina.home} and ${catalina.base} respectively.
 
 For example, the standard manager web application can be kept in
-CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
-the following trick:
+CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by copying
+its deployment descriptor into the desired virtual host:
 
  * Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml


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



[tomcat] branch master updated: Updated text per @schultz

2020-10-20 Thread isapir
This is an automated email from the ASF dual-hosted git repository.

isapir 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 647ad9b  Updated text per @schultz
647ad9b is described below

commit 647ad9b641042ccf8cefdcbe6e5ca8900fdf54df
Author: Igal Sapir 
AuthorDate: Tue Oct 20 21:08:53 2020 -0700

Updated text per @schultz
---
 RUNNING.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RUNNING.txt b/RUNNING.txt
index 9f9b4b2..a4b2d76 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -297,8 +297,8 @@ CATALINA_BASE can be referenced in the XML configuration 
files processed
 by Tomcat as ${catalina.home} and ${catalina.base} respectively.
 
 For example, the standard manager web application can be kept in
-CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by using
-the following trick:
+CATALINA_HOME/webapps/manager and loaded into CATALINA_BASE by copying
+its deployment descriptor into the desired virtual host:
 
  * Copy the CATALINA_HOME/webapps/manager/META-INF/context.xml
file as CATALINA_BASE/conf/Catalina/localhost/manager.xml


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



[Bug 60030] Run away CPU with JSSE / OpenSSL with IE8

2020-10-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60030

--- Comment #5 from rahel widaya  ---
1. Poker 88
Diusung sebelum hadirnya lawanqq. Poker 88 terbukti memiliki banyak member
aktif semenjak awal peluncurannya. Hadir dengan 8 macam permainan kartu yang
memanjakan anda, https://199.192.31.67 seakan menjadikan nafas baru yang dirasa
bisa menjadi tambang yang baik untuk member menarik banyak keuntungan ketika
bermain judi poker 88 online.
Di Dewabet anda bisa Bermain Aneka Permanan Khas server IDN Games yaitu;
•   Domino 99 Kiu Kiu,
•   Texas Hold’Em Poker,
•   Bandar QQ,
•   Bandar 66,
•   Capsa Susun,
•   Bandar Poker,
•   Bandar 66, dan
•   AduQ,
2. DEWATOGELONLINE88
Dewatogelonline88 Merupakan Situs togel online Terbaru di akhir tahun 2019.
Situs Ini Berhasil Memperoleh banyak member dan memberikan banyak kemenangan
sehingga di akreditasi terbaik oleh banyak situs referensi untuk dimainkan.
http://www.dewatogelonline88.com/ merupakan Situs judi pkv terbaik dan yang
menjajikan kemenangan bermain di situs nya hingga 98%, Angka yang begitu
menjanjikan untuk kemenangan dalam permainan kartu online anda.
3. Pokerclub88
Pokerclub88 merupakan Agen Poker QQ Online Terbaik yang menyediakan semua jenis
permainan kartu di main gamenya. Hadir dengan dengan segala kemudahan sebagai
agen judi terpercaya, https://199.192.27.121  mengusung slogan mudah, murah dan
aman.
•   Mudah
PokerAce bisa dimainkan kapan saja dimana pun selama ada jaringan internet,
bahkan di android sekalipun
•   Murah
Dengan Minimal Deposit 25.000 saja anda sudah berkesempatan mendapatkan
kemenangan hingga jutaan rupiah dan bisa bermain di semua permainan yang
disediakan.
•   Aman
Permainan di PokerAce dijamin 100% fairplay.
4. Poker lounge
PokerLounge99 sebagai agen poker online indonesia terbesar dan terpercaya yang
sudah lama menggunakan sistem keamanan terkini yang selalu di perbaharui dan
dilengkapi dengan perangkat keras dan lunak yang canggih sehingga kenyamanan,
keamanan dan rahasia data pribadi Anda aman bersama https://199.192.27.100.
PokerLounge99 agen togel dan poker online dari indonesia yang terpercaya
menggunakan uang asli dan menyediakan permainan live games.

-- 
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



[Bug 64818] Allow duplicate URL mapping to the same Servlet

2020-10-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64818

--- Comment #7 from Christopher Schultz  ---
(In reply to mgrigorov from comment #6)
> (In reply to Christopher Schultz from comment #5)
> > What about specifying the (same) mapping in both @Annotations and also in
> > WEB-INF/web.xml? If that causes an error, it would be *very* frustrating. I
> > wouldn't consider this a bug, but rather two separate ways of specifying the
> > same thing.
> 
> XML config overrides the annotations.

Aha, so in that case one "replaces" the other, instead of that being a
"duplicate" mapping?

Then I'm okay either way on this one.

-- 
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



RE: jstl jar location

2020-10-20 Thread George Stanchev
Apologies. I accidently sent this to the wrong mailing list. Will resend to the 
user mailing list.


From: George Stanchev
Sent: Tuesday, October 20, 2020 1:02 PM
To: Tomcat Developers List 
Subject: jstl jar location

I am hoping someone can shed some lights on a question. I did try to search 
online and SO but haven't had luck in figure it out so hopefully it is a quick 
answer from the people that know that stuff. We have an uber-lib folder where 
we keep shared libraries in our TC85-hosted app. If we put jstl-1.2.jar into 
that directory but not in the application /WEB-INF/lib directory, TC generates 
[1]. If I move jstl into the application lib folder, it works. I made sure jstl 
is excluded from jarsToSkip and included in jarsToScan.

Is there any rule or switch that says that the JSP compiler cannot use the 
parent CL to resolve the jstl URIs?

George



[1]
Type Exception Report
Message The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be 
resolved in either web.xml or the jar files deployed with this application
Description The server encountered an unexpected condition that prevented it 
from fulfilling the request.
Exception
org.apache.jasper.JasperException: The absolute uri: 
[http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the 
jar files deployed with this application
 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:293)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:80)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:251)

org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:122)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:489)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1445)
org.apache.jasper.compiler.Parser.parse(Parser.java:144)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:375)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:351)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:335)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:597)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)

org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:304)

org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1286)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1041)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:984)
  
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)

org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)



jstl jar location

2020-10-20 Thread George Stanchev
I am hoping someone can shed some lights on a question. I did try to search 
online and SO but haven't had luck in figure it out so hopefully it is a quick 
answer from the people that know that stuff. We have an uber-lib folder where 
we keep shared libraries in our TC85-hosted app. If we put jstl-1.2.jar into 
that directory but not in the application /WEB-INF/lib directory, TC generates 
[1]. If I move jstl into the application lib folder, it works. I made sure jstl 
is excluded from jarsToSkip and included in jarsToScan.

Is there any rule or switch that says that the JSP compiler cannot use the 
parent CL to resolve the jstl URIs?

George



[1]
Type Exception Report
Message The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be 
resolved in either web.xml or the jar files deployed with this application
Description The server encountered an unexpected condition that prevented it 
from fulfilling the request.
Exception
org.apache.jasper.JasperException: The absolute uri: 
[http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the 
jar files deployed with this application
 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:293)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:80)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:251)

org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:122)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:489)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1445)
org.apache.jasper.compiler.Parser.parse(Parser.java:144)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:375)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:351)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:335)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:597)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)

org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:304)

org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1286)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1041)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:984)
  
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)

org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)



[Bug 64818] Allow duplicate URL mapping to the same Servlet

2020-10-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64818

--- Comment #6 from mgrigorov  ---
(In reply to Christopher Schultz from comment #5)
> What about specifying the (same) mapping in both @Annotations and also in
> WEB-INF/web.xml? If that causes an error, it would be *very* frustrating. I
> wouldn't consider this a bug, but rather two separate ways of specifying the
> same thing.

XML config overrides the annotations.

-- 
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



[Bug 64818] Allow duplicate URL mapping to the same Servlet

2020-10-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64818

--- Comment #5 from Christopher Schultz  ---
What about specifying the (same) mapping in both @Annotations and also in
WEB-INF/web.xml? If that causes an error, it would be *very* frustrating. I
wouldn't consider this a bug, but rather two separate ways of specifying the
same thing.

-- 
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



[Bug 64832] New: Invalid byte tag in constant pool 19 on tomcat-juli

2020-10-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64832

Bug ID: 64832
   Summary: Invalid byte tag in constant pool 19 on tomcat-juli
   Product: Tomcat 9
   Version: 9.0.38
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Packaging
  Assignee: dev@tomcat.apache.org
  Reporter: rosbaldes...@hotmail.com
  Target Milestone: -

Getting this warning when starting up a Tomcat 9.0.38 instance with a webapp
that uses the tomcat-jdbc maven library:

Oct 20, 2020 12:59:15 PM org.apache.catalina.startup.ContextConfig
processAnnotationsJar
SEVERE: Unable to process Jar entry [module-info.class] from Jar
[jar:file:/opt/webapp/WEB-INF/lib/tomcat-juli-9.0.38.jar!/] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in
constant pool: 19
at
org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:133)
at
org.apache.tomcat.util.bcel.classfile.ConstantPool.(ConstantPool.java:60)
at
org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:209)
at
org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:119)
at
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2125)
at
org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2001)
at
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1967)
at
org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1952)
at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1326)
at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at
org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1553)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at
org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:622)
at
org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:569)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at
com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at
javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
at java.security.AccessController.doPrivileged(Native Method)
at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  

[Bug 64818] Allow duplicate URL mapping to the same Servlet

2020-10-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64818

--- Comment #4 from Mark Thomas  ---
The text from the spec is:


If the effective web.xml (after merging information from fragments and
annotations) contains any url-patterns that are mapped to multiple servlets
then the deployment must fail.


I've traced this back to the original EG discussion and it was only considering
one URL pattern mapping to multiple Servlets. The case of duplicate mappings
(same URL, same servlet) was not discussed.

While I accept that the spec language is not as explicit as I thought, I remain
of the view that this should be a WONTFIX. If this situation arises, clearly an
error has occurred. The proposed solution assumes one particular error and
"auto-corrects" based on that assumption. However, the assumption may not be
valid. I think it is better to fail the deployment and require the error to be
fixed rather than making assumptions about how it should be fixed.

-- 
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 8.5.x updated: Add option from JAAS to the JNDI realm

2020-10-20 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 c7a383d  Add option from JAAS to the JNDI realm
c7a383d is described below

commit c7a383d97977dbf84017ee6ac7f62712d1a1709f
Author: remm 
AuthorDate: Tue Oct 20 11:21:36 2020 +0200

Add option from JAAS to the JNDI realm

JNDI connections can allocate things and resources such as thread, this
can avoid classloader leaking.
---
 java/org/apache/catalina/realm/JNDIRealm.java | 36 +++
 webapps/docs/changelog.xml|  5 
 webapps/docs/config/realm.xml |  7 ++
 3 files changed, 48 insertions(+)

diff --git a/java/org/apache/catalina/realm/JNDIRealm.java 
b/java/org/apache/catalina/realm/JNDIRealm.java
index e5d6faf..daa76bf 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -498,6 +498,14 @@ public class JNDIRealm extends RealmBase {
 protected int connectionPoolSize = 1;
 
 
+/**
+ * Whether to use context ClassLoader or default ClassLoader.
+ * True means use context ClassLoader, and True is the default
+ * value.
+ */
+protected boolean useContextClassLoader = true;
+
+
 // - Properties
 
 public boolean getForceDnHexEscape() {
@@ -1254,6 +1262,26 @@ public class JNDIRealm extends RealmBase {
 return clazz.getConstructor().newInstance();
 }
 
+/**
+ * Sets whether to use the context or default ClassLoader.
+ * True means use context ClassLoader.
+ *
+ * @param useContext True means use context ClassLoader
+ */
+public void setUseContextClassLoader(boolean useContext) {
+useContextClassLoader = useContext;
+}
+
+/**
+ * Returns whether to use the context or default ClassLoader.
+ * True means to use the context ClassLoader.
+ *
+ * @return The value of useContextClassLoader
+ */
+public boolean isUseContextClassLoader() {
+return useContextClassLoader;
+}
+
 // -- Realm Methods
 
 /**
@@ -2502,7 +2530,12 @@ public class JNDIRealm extends RealmBase {
  * @throws NamingException if a directory server error occurs
  */
 protected void open(JNDIConnection connection) throws NamingException {
+ClassLoader ocl = null;
 try {
+if (!isUseContextClassLoader()) {
+ocl = Thread.currentThread().getContextClassLoader();
+
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
+}
 // Ensure that we have a directory context available
 connection.context = 
createDirContext(getDirectoryContextEnvironment());
 } catch (Exception e) {
@@ -2519,6 +2552,9 @@ public class JNDIRealm extends RealmBase {
 // reset it in case the connection times out.
 // the primary may come back.
 connectionAttempt = 0;
+if (!isUseContextClassLoader()) {
+Thread.currentThread().setContextClassLoader(ocl);
+}
 }
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 108a9e1..d4c8583 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -67,6 +67,11 @@
 connection scenario. Also remove all connections from the pool after
 an error. (remm)
   
+  
+JNDIRealm connections should only be created with the container
+classloader as the thread context classloader, just like for the JAAS
+realm. (remm)
+  
 
   
   
diff --git a/webapps/docs/config/realm.xml b/webapps/docs/config/realm.xml
index ba8c217..4f515fb 100644
--- a/webapps/docs/config/realm.xml
+++ b/webapps/docs/config/realm.xml
@@ -508,6 +508,13 @@
specified, the default value of 302 is used.
   
 
+  
+Instructs JNDIRealm to use the context class loader when opening the
+connection for the JNDI provider. The default value is
+true. To load classes using the container's classloader,
+specify false.
+  
+
   
 When the JNDIRealm is used with the SPNEGO authenticator, delegated
 credentials for the user may be available. If such credentials are


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



[tomcat] branch master updated: Add option from JAAS to the JNDI realm

2020-10-20 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 6fe9ef6  Add option from JAAS to the JNDI realm
6fe9ef6 is described below

commit 6fe9ef6c9af4682178cfb48e5fab1f132da0464d
Author: remm 
AuthorDate: Tue Oct 20 11:21:36 2020 +0200

Add option from JAAS to the JNDI realm

JNDI connections can allocate things and resources such as thread, this
can avoid classloader leaking.
---
 java/org/apache/catalina/realm/JNDIRealm.java | 36 +++
 webapps/docs/changelog.xml|  5 
 webapps/docs/config/realm.xml |  7 ++
 3 files changed, 48 insertions(+)

diff --git a/java/org/apache/catalina/realm/JNDIRealm.java 
b/java/org/apache/catalina/realm/JNDIRealm.java
index 21e9f17..e7543d8 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -490,6 +490,14 @@ public class JNDIRealm extends RealmBase {
 protected int connectionPoolSize = 1;
 
 
+/**
+ * Whether to use context ClassLoader or default ClassLoader.
+ * True means use context ClassLoader, and True is the default
+ * value.
+ */
+protected boolean useContextClassLoader = true;
+
+
 // - Properties
 
 public boolean getForceDnHexEscape() {
@@ -1246,6 +1254,26 @@ public class JNDIRealm extends RealmBase {
 return clazz.getConstructor().newInstance();
 }
 
+/**
+ * Sets whether to use the context or default ClassLoader.
+ * True means use context ClassLoader.
+ *
+ * @param useContext True means use context ClassLoader
+ */
+public void setUseContextClassLoader(boolean useContext) {
+useContextClassLoader = useContext;
+}
+
+/**
+ * Returns whether to use the context or default ClassLoader.
+ * True means to use the context ClassLoader.
+ *
+ * @return The value of useContextClassLoader
+ */
+public boolean isUseContextClassLoader() {
+return useContextClassLoader;
+}
+
 // -- Realm Methods
 
 /**
@@ -2486,7 +2514,12 @@ public class JNDIRealm extends RealmBase {
  * @throws NamingException if a directory server error occurs
  */
 protected void open(JNDIConnection connection) throws NamingException {
+ClassLoader ocl = null;
 try {
+if (!isUseContextClassLoader()) {
+ocl = Thread.currentThread().getContextClassLoader();
+
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
+}
 // Ensure that we have a directory context available
 connection.context = 
createDirContext(getDirectoryContextEnvironment());
 } catch (Exception e) {
@@ -2503,6 +2536,9 @@ public class JNDIRealm extends RealmBase {
 // reset it in case the connection times out.
 // the primary may come back.
 connectionAttempt = 0;
+if (!isUseContextClassLoader()) {
+Thread.currentThread().setContextClassLoader(ocl);
+}
 }
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f174bc9..1f72a47 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -75,6 +75,11 @@
 ErrorReportValve that returns  response as JSON instead of
 HTML. (kfujino)
   
+  
+JNDIRealm connections should only be created with the container
+classloader as the thread context classloader, just like for the JAAS
+realm. (remm)
+  
 
   
   
diff --git a/webapps/docs/config/realm.xml b/webapps/docs/config/realm.xml
index d14fde1..05e50bf 100644
--- a/webapps/docs/config/realm.xml
+++ b/webapps/docs/config/realm.xml
@@ -508,6 +508,13 @@
specified, the default value of 302 is used.
   
 
+  
+Instructs JNDIRealm to use the context class loader when opening the
+connection for the JNDI provider. The default value is
+true. To load classes using the container's classloader,
+specify false.
+  
+
   
 When the JNDIRealm is used with the SPNEGO authenticator, delegated
 credentials for the user may be available. If such credentials are


-
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: Add option from JAAS to the JNDI realm

2020-10-20 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 4ba1769  Add option from JAAS to the JNDI realm
4ba1769 is described below

commit 4ba17698d324f4d0d8565a78021c09d1a33e5cf1
Author: remm 
AuthorDate: Tue Oct 20 11:21:36 2020 +0200

Add option from JAAS to the JNDI realm

JNDI connections can allocate things and resources such as thread, this
can avoid classloader leaking.
---
 java/org/apache/catalina/realm/JNDIRealm.java | 36 +++
 webapps/docs/changelog.xml|  5 
 webapps/docs/config/realm.xml |  7 ++
 3 files changed, 48 insertions(+)

diff --git a/java/org/apache/catalina/realm/JNDIRealm.java 
b/java/org/apache/catalina/realm/JNDIRealm.java
index 30527c4..3d952c0 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -490,6 +490,14 @@ public class JNDIRealm extends RealmBase {
 protected int connectionPoolSize = 1;
 
 
+/**
+ * Whether to use context ClassLoader or default ClassLoader.
+ * True means use context ClassLoader, and True is the default
+ * value.
+ */
+protected boolean useContextClassLoader = true;
+
+
 // - Properties
 
 public boolean getForceDnHexEscape() {
@@ -1246,6 +1254,26 @@ public class JNDIRealm extends RealmBase {
 return clazz.getConstructor().newInstance();
 }
 
+/**
+ * Sets whether to use the context or default ClassLoader.
+ * True means use context ClassLoader.
+ *
+ * @param useContext True means use context ClassLoader
+ */
+public void setUseContextClassLoader(boolean useContext) {
+useContextClassLoader = useContext;
+}
+
+/**
+ * Returns whether to use the context or default ClassLoader.
+ * True means to use the context ClassLoader.
+ *
+ * @return The value of useContextClassLoader
+ */
+public boolean isUseContextClassLoader() {
+return useContextClassLoader;
+}
+
 // -- Realm Methods
 
 /**
@@ -2487,7 +2515,12 @@ public class JNDIRealm extends RealmBase {
  * @throws NamingException if a directory server error occurs
  */
 protected void open(JNDIConnection connection) throws NamingException {
+ClassLoader ocl = null;
 try {
+if (!isUseContextClassLoader()) {
+ocl = Thread.currentThread().getContextClassLoader();
+
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
+}
 // Ensure that we have a directory context available
 connection.context = 
createDirContext(getDirectoryContextEnvironment());
 } catch (Exception e) {
@@ -2504,6 +2537,9 @@ public class JNDIRealm extends RealmBase {
 // reset it in case the connection times out.
 // the primary may come back.
 connectionAttempt = 0;
+if (!isUseContextClassLoader()) {
+Thread.currentThread().setContextClassLoader(ocl);
+}
 }
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1313b0c..db32630 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -75,6 +75,11 @@
 ErrorReportValve that returns  response as JSON instead of
 HTML. (kfujino)
   
+  
+JNDIRealm connections should only be created with the container
+classloader as the thread context classloader, just like for the JAAS
+realm. (remm)
+  
 
   
   
diff --git a/webapps/docs/config/realm.xml b/webapps/docs/config/realm.xml
index 628b186..eaa8872 100644
--- a/webapps/docs/config/realm.xml
+++ b/webapps/docs/config/realm.xml
@@ -508,6 +508,13 @@
specified, the default value of 302 is used.
   
 
+  
+Instructs JNDIRealm to use the context class loader when opening the
+connection for the JNDI provider. The default value is
+true. To load classes using the container's classloader,
+specify false.
+  
+
   
 When the JNDIRealm is used with the SPNEGO authenticator, delegated
 credentials for the user may be available. If such credentials are


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