[GitHub] [tomcat] mcgitty commented on pull request #367: HTML URL must match RemoteAddrValve allow pattern

2020-09-22 Thread GitBox


mcgitty commented on pull request #367:
URL: https://github.com/apache/tomcat/pull/367#issuecomment-696835594


   Hi Mark,
   
   I found the root cause of the issue. It is the confusion created by this
   paragraph:
   
   > A default Tomcat installation includes the Manager. To add an instance of
   > the Manager web application Context to a new host install the manager.xml
   > context configuration file in the
   > $CATALINA_BASE/conf/[enginename]/[hostname] folder. Here is an example:
   >
   >   docBase="${catalina.home}/webapps/manager">
   > allow="127\.0\.0\.1" />
   > 
   >
   > If I follow the above instructions to create
   *conf/Catalina/localhost/manager.xml* while having the out of the box
   folder in *${catalina.home}/webapps/manager*, then the "localhost" URL will
   get a "403 Access Denied" error and the "127.0.0.1" URL works. Remove the
   redundant manager.xml file makes both URLs work.
   
   The first sentence does not adequately describe that "a default Tomcat
   installation" means having the out of the box folder
   *${catalina.home}/webapps/manager*, and that users *should not create*
   *conf/Catalina/localhost/manager.xml* *at the same time*. Notice the sample
   manager.xml above points docBase to the default Tomcat installation path of
   manager, which is another pitfall by design.
   
   Thanks
   
   --Michael
   
   On Tue, Sep 22, 2020 at 6:48 AM Mark Thomas 
   wrote:
   
   > The premise of this PR is incorrect. The allow pattern in the
   > RemoteAddrValve has no relationship to the host name used to access the
   > Tomcat instance. The pattern is matched against the client IP address.
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > , or
   > unsubscribe
   > 

   > .
   >
   
   -- 
   CONFIDENTIALITY NOTICE: This e-mail, including attachments, is for the sole 
   use of the intended recipient(s) and may contain confidential and 
   privileged information or otherwise be protected by law. Any unauthorized 
   review, use, disclosure or distribution is prohibited. If you are not the 
   intended recipient, please contact the sender and destroy all copies and 
   the original message.
   



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



[GitHub] [tomcat] jbampton commented on pull request #361: Add a GitHub action to lint the Markdown and YAML files.

2020-09-22 Thread GitBox


jbampton commented on pull request #361:
URL: https://github.com/apache/tomcat/pull/361#issuecomment-696741586


   Hey @markt-asf what do you think about this PR ?



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



[GitHub] [tomcat] markt-asf commented on pull request #367: HTML URL must match RemoteAddrValve allow pattern

2020-09-22 Thread GitBox


markt-asf commented on pull request #367:
URL: https://github.com/apache/tomcat/pull/367#issuecomment-696733828


   The premise of this PR is incorrect. The allow pattern in the 
`RemoteAddrValve` has no relationship to the host name used to access the 
Tomcat instance. The pattern is matched against the client IP address.



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



[GitHub] [tomcat] jbampton commented on pull request #362: Fix spelling

2020-09-22 Thread GitBox


jbampton commented on pull request #362:
URL: https://github.com/apache/tomcat/pull/362#issuecomment-696680907


   Hey @markt-asf I just rebased and we have 20 files changed only in the 
`.xsd` files. 
   
   Seems to be the same twenty that was in your list.
   
   



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



[GitHub] [tomcat] kamnani commented on pull request #351: Remove White Spaces from the JSP files

2020-09-22 Thread GitBox


kamnani commented on pull request #351:
URL: https://github.com/apache/tomcat/pull/351#issuecomment-696807874


   @markt-asf 
   
   I am sure you wouldn't be able to test this on proprietary code, because 
that will generate empty outputs/compile-errors after stripping out the 
important lines.
   
   I am attaching the JSP from the tomcat code itself, and the results will be 
quite evident once you use the flag in this PR. 
   
   This is the index.jsp file from the ROOT web application in tomcat's code. 
You can use both the parameters and see the difference they exhibit. Also, do 
make sure to clear out the work folder after testing any of the parameter just 
to clear out the cache. 
   
   ```
   <%--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
   
   http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   --%>
   <%@ page session="false" pageEncoding="UTF-8" contentType="text/html; 
charset=UTF-8" %>
   <%
   java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("");
   request.setAttribute("year", sdf.format(new java.util.Date()));
   request.setAttribute("tomcatUrl", "https://tomcat.apache.org/;);
   request.setAttribute("tomcatDocUrl", "/docs/");
   request.setAttribute("tomcatExamplesUrl", "/examples/");
   %>
   
   
   
   
   <%=request.getServletContext().getServerInfo() %>
   
   
   
   
   
   
   
   
   Home
   Documentation
   Configuration
   Examples
   https://wiki.apache.org/tomcat/FrontPage;>Wiki
   Mailing Lists
   Find 
Help
   
   
   
   ${pageContext.servletContext.serverInfo}
   
   
   
   If you're seeing this, you've successfully installed 
Tomcat. Congratulations!
   
   
   
   
   Recommended Reading:
   Security Considerations 
How-To
   Manager Application How-To
   Clustering/Session Replication 
How-To
   
   
   
   
   Server Status
   
   
   Manager App
   
   
   Host Manager
   
   
   
   
   
   Developer Quick Start
   
   
   Tomcat 
Setup
   First Web 
Application
   
   
   
   
   Realms 
 AAA
   JDBC 
DataSources
   
   
   
   
   Examples
   
   
   
   
   https://wiki.apache.org/tomcat/Specifications;>Servlet 
Specifications
   https://wiki.apache.org/tomcat/TomcatVersions;>Tomcat Versions
   
   
   
   
   
   
   
   Managing Tomcat
   For security, access to the manager webapp is restricted.
   Users are defined in:
   $CATALINA_HOME/conf/tomcat-users.xml
   In Tomcat 10.0 access to the manager application 
is split between
  different users.  Read more...
   
   Release Notes
   Changelog
   Migration 
Guide
   Security 
Notices
   
   
   
   
   Documentation
   Tomcat 10.0 

[GitHub] [tomcat] markt-asf closed pull request #367: HTML URL must match RemoteAddrValve allow pattern

2020-09-22 Thread GitBox


markt-asf closed pull request #367:
URL: https://github.com/apache/tomcat/pull/367


   



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



[GitHub] [tomcat] markt-asf commented on pull request #362: Fix spelling

2020-09-22 Thread GitBox


markt-asf commented on pull request #362:
URL: https://github.com/apache/tomcat/pull/362#issuecomment-696726509


   Great. Thanks for the confirmation. On that basis, I am going to close the 
PR. Thanks for all the fixes.



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



[GitHub] [tomcat] markt-asf closed pull request #362: Fix spelling

2020-09-22 Thread GitBox


markt-asf closed pull request #362:
URL: https://github.com/apache/tomcat/pull/362


   



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



[GitHub] [tomcat] kamnani commented on pull request #352: Optimizing Resource Lookup using Bloom Filter

2020-09-22 Thread GitBox


kamnani commented on pull request #352:
URL: https://github.com/apache/tomcat/pull/352#issuecomment-696834567







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



[GitHub] [tomcat] rmaucher commented on pull request #352: Optimizing Resource Lookup using Bloom Filter

2020-09-22 Thread GitBox


rmaucher commented on pull request #352:
URL: https://github.com/apache/tomcat/pull/352#issuecomment-696769628







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



[GitHub] [tomcat] kamnani commented on pull request #352: Optimizing Resource Lookup using Bloom Filter

2020-09-22 Thread GitBox


kamnani commented on pull request #352:
URL: https://github.com/apache/tomcat/pull/352#issuecomment-696930075


   > There's no cache here: the AbstractArchiveResourceSet already has a 
"JarFile archive" field, so it adds a new JarContents field with the same data 
and both get created and cleared at the same time. Looking back at the other 
#340 there were problems with the loader/classloader modifications which IMO 
look like a big hack and have a JAR cache.
   
   I think, your solution does make sense to me. I will still need these code 
lines in AbstactArchiveResourceSet just to skip checking a jar if the resource 
is not going to be found there. 
   
   ```
  if (!jarContents.mightContainResource(path, webAppMount)) {
   return new EmptyResource(root, path);
   }
   ```



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



[GitHub] [tomcat] rmaucher commented on pull request #352: Optimizing Resource Lookup using Bloom Filter

2020-09-22 Thread GitBox


rmaucher commented on pull request #352:
URL: https://github.com/apache/tomcat/pull/352#issuecomment-696927281


   There's no cache here: the AbstractArchiveResourceSet already has a "JarFile 
archive" field, so it adds a new JarContents field with the same data and both 
get created and cleared at the same time. Looking back at the other #340 there 
were problems with the loader/classloader modifications which IMO look like a 
big hack and have a JAR cache.



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



[ANN] Apache Tomcat 7.0.106 released

2020-09-22 Thread Violeta Georgieva
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 7.0.106.

Apache Tomcat is an open source software implementation of the Java
Servlet, JavaServer Pages, Java Expression Language and Java
WebSocket technologies.

This release contains a number of bug fixes and improvements compared to
version 7.0.105. The notable changes since 7.0.105 include:


- Add support for a read idle timeout and a write idle timeout to the
  WebSocket session via custom properties in the user properties
  instance associated with the session. Based on a pull request by
  sakshamverma.

- Update the packaged version of the Tomcat Native Library to 1.2.25


Please refer to the change log for the complete list of changes:
http://tomcat.apache.org/tomcat-7.0-doc/changelog.html

Apache Tomcat website:
http://tomcat.apache.org

Downloads:
http://tomcat.apache.org/download-70.cgi

Migration guides from Apache Tomcat 5.5.x and 6.0.x:
http://tomcat.apache.org/migration.html

Enjoy

The Apache Tomcat team


svn commit: r41541 - /release/tomcat/tomcat-7/v7.0.105/

2020-09-22 Thread violetagg
Author: violetagg
Date: Tue Sep 22 17:42:36 2020
New Revision: 41541

Log:
Remove 7.0.105

Removed:
release/tomcat/tomcat-7/v7.0.105/


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



svn commit: r1881938 - in /tomcat/site/trunk/docs: ./ tomcat-7.0-doc/ tomcat-7.0-doc/annotationapi/ tomcat-7.0-doc/annotationapi/javax/annotation/ tomcat-7.0-doc/annotationapi/javax/annotation/securit

2020-09-22 Thread violetagg
Author: violetagg
Date: Tue Sep 22 17:38:49 2020
New Revision: 1881938

URL: http://svn.apache.org/viewvc?rev=1881938=rev
Log:
Update docs for Apache Tomcat 7.0.106 release.


[This commit notification would consist of 398 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

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



svn commit: r1881937 - in /tomcat/site/trunk: ./ docs/ xdocs/

2020-09-22 Thread violetagg
Author: violetagg
Date: Tue Sep 22 17:25:52 2020
New Revision: 1881937

URL: http://svn.apache.org/viewvc?rev=1881937=rev
Log:
Updates (excluding docs) for 7.0.106 release

Modified:
tomcat/site/trunk/build.properties.default
tomcat/site/trunk/docs/doap_Tomcat.rdf
tomcat/site/trunk/docs/download-70.html
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/migration-7.html
tomcat/site/trunk/docs/oldnews.html
tomcat/site/trunk/docs/whichversion.html
tomcat/site/trunk/xdocs/doap_Tomcat.rdf
tomcat/site/trunk/xdocs/download-70.xml
tomcat/site/trunk/xdocs/index.xml
tomcat/site/trunk/xdocs/migration-7.xml
tomcat/site/trunk/xdocs/oldnews.xml
tomcat/site/trunk/xdocs/whichversion.xml

Modified: tomcat/site/trunk/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/build.properties.default?rev=1881937=1881936=1881937=diff
==
--- tomcat/site/trunk/build.properties.default (original)
+++ tomcat/site/trunk/build.properties.default Tue Sep 22 17:25:52 2020
@@ -36,7 +36,7 @@ tomcat.loc=https://downloads.apache.org/
 
 
 # - Tomcat versions -
-tomcat70=7.0.105
+tomcat70=7.0.106
 tomcat85=8.5.58
 tomcat90=9.0.38
 tomcat100=10.0.0-M8

Modified: tomcat/site/trunk/docs/doap_Tomcat.rdf
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/doap_Tomcat.rdf?rev=1881937=1881936=1881937=diff
==
--- tomcat/site/trunk/docs/doap_Tomcat.rdf (original)
+++ tomcat/site/trunk/docs/doap_Tomcat.rdf Tue Sep 22 17:25:52 2020
@@ -74,8 +74,8 @@
 
   
 Latest Stable 7.0.x Release
-2020-07-07
-7.0.105
+2020-09-20
+7.0.106
   
 
 

Modified: tomcat/site/trunk/docs/download-70.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-70.html?rev=1881937=1881936=1881937=diff
==
--- tomcat/site/trunk/docs/download-70.html (original)
+++ tomcat/site/trunk/docs/download-70.html Tue Sep 22 17:25:52 2020
@@ -12,7 +12,7 @@
 
   Quick Navigation
 
-[define v]7.0.105[end]
+[define v]7.0.106[end]
 https://downloads.apache.org/tomcat/tomcat-7/KEYS;>KEYS |
 [v] |
 Browse |

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1881937=1881936=1881937=diff
==
--- tomcat/site/trunk/docs/index.html (original)
+++ tomcat/site/trunk/docs/index.html Tue Sep 22 17:25:52 2020
@@ -28,6 +28,29 @@ wiki page.
 Apache Tomcat, Tomcat, Apache, the Apache feather, and the Apache Tomcat
 project logo are trademarks of the Apache Software Foundation.
 
+2020-09-20 Tomcat 7.0.106 Released
+
+The Apache Tomcat Project is proud to announce the release of version 7.0.106 
of
+Apache Tomcat. This release contains a number of bug fixes and improvements
+compared to version 7.0.105.
+
+Add support for a read idle timeout and a write idle timeout to the
+WebSocket session via custom properties in the user properties instance
+associated with the session. Based on a pull request by sakshamverma.
+Update the packaged version of the Tomcat Native Library to 1.2.25
+
+
+Full details of these changes, and all the other changes, are available in the
+Tomcat 7 
changelog.
+
+
+Note: End of life date for Apache Tomcat 7.0.x is 
announced.
+Read more...
+
+
+
+https://tomcat.apache.org/download-70.cgi;>Download
+
 2020-09-15 Tomcat 9.0.38 Released
 
 The Apache Tomcat Project is proud to announce the release of version 9.0.38
@@ -127,28 +150,6 @@ Tomcat Native. The notable changes since
 https://tomcat.apache.org/download-native.cgi;>Download |
 ChangeLog for 1.2.25
 
-2020-07-07 Tomcat 7.0.105 Released
-
-The Apache Tomcat Project is proud to announce the release of version 7.0.105 
of
-Apache Tomcat. This release contains a number of bug fixes and improvements
-compared to version 7.0.104.
-
-Add support for the CATALINA_OUT_CMD environment variable that defines a
-command to which captured stdout and stderr will be redirected. For use
-with, for example, rotatelogs. Patch provided by Harald Dunkel.
-
-
-Full details of these changes, and all the other changes, are available in the
-Tomcat 7 
changelog.
-
-
-Note: End of life date for Apache Tomcat 7.0.x is 
announced.
-Read more...
-
-
-
-https://tomcat.apache.org/download-70.cgi;>Download
-
 2020-03-06 Tomcat Connectors 1.2.48 Released
 
 The Apache Tomcat Project is proud to announce the release of version 1.2.48 of

Modified: tomcat/site/trunk/docs/migration-7.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration-7.html?rev=1881937=1881936=1881937=diff
==
--- 

[GitHub] [tomcat] mcgitty commented on pull request #367: HTML URL must match RemoteAddrValve allow pattern

2020-09-22 Thread GitBox


mcgitty commented on pull request #367:
URL: https://github.com/apache/tomcat/pull/367#issuecomment-696835594


   Hi Mark,
   
   I found the root cause of the issue. It is the confusion created by this
   paragraph:
   
   > A default Tomcat installation includes the Manager. To add an instance of
   > the Manager web application Context to a new host install the manager.xml
   > context configuration file in the
   > $CATALINA_BASE/conf/[enginename]/[hostname] folder. Here is an example:
   >
   >   docBase="${catalina.home}/webapps/manager">
   > allow="127\.0\.0\.1" />
   > 
   >
   > If I follow the above instructions to create
   *conf/Catalina/localhost/manager.xml* while having the out of the box
   folder in *${catalina.home}/webapps/manager*, then the "localhost" URL will
   get a "403 Access Denied" error and the "127.0.0.1" URL works. Remove the
   redundant manager.xml file makes both URLs work.
   
   The first sentence does not adequately describe that "a default Tomcat
   installation" means having the out of the box folder
   *${catalina.home}/webapps/manager*, and that users *should not create*
   *conf/Catalina/localhost/manager.xml* *at the same time*. Notice the sample
   manager.xml above points docBase to the default Tomcat installation path of
   manager, which is another pitfall by design.
   
   Thanks
   
   --Michael
   
   On Tue, Sep 22, 2020 at 6:48 AM Mark Thomas 
   wrote:
   
   > The premise of this PR is incorrect. The allow pattern in the
   > RemoteAddrValve has no relationship to the host name used to access the
   > Tomcat instance. The pattern is matched against the client IP address.
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > , or
   > unsubscribe
   > 

   > .
   >
   
   -- 
   CONFIDENTIALITY NOTICE: This e-mail, including attachments, is for the sole 
   use of the intended recipient(s) and may contain confidential and 
   privileged information or otherwise be protected by law. Any unauthorized 
   review, use, disclosure or distribution is prohibited. If you are not the 
   intended recipient, please contact the sender and destroy all copies and 
   the original message.
   



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



[GitHub] [tomcat] kamnani commented on pull request #352: Optimizing Resource Lookup using Bloom Filter

2020-09-22 Thread GitBox


kamnani commented on pull request #352:
URL: https://github.com/apache/tomcat/pull/352#issuecomment-696834567


   > I made the change to use the Context instead of the Host, no issue there.
   > However, I'm not ok with the proposed changes as is. The problem for me is 
that I don't understand the weird code added to AbstractArchiveResourceSet. I 
am ok with adding the creation of that JarContents filter in openJarFile() 
[even with the sync ...], basically, but not elsewhere, and without the strange 
custom refresh mechanism on lookup.
   > Then, since it is _likely_ quite harmless, it could be enabled by default 
(and maybe the flag can be removed altogether ...).
   
   
   @rmaucher  I agree for the creation of JarContent in OpenJarFile(), however 
the crux of the optimization will be when we are checking for the resource in a 
Jar. So we still need to add this code inside getResource() call, the way its 
been in the PR after we create the JarContent.
   
   ```
   if (!jarContents.mightContainResource(path, webAppMount)) {
   return new EmptyResource(root, path);
   }
   ```
   
   For the custom refresh mechanism, we added that with regard to PR #340  
where Mark(comment attached below) had asked us about the cache validation 
mechanism. 
   
   ```
   I don't see any cache validation meaning updated JARs (with the same name) 
will be ignored. That is likely to trigger all sorts of unexpected bugs.
   ```
   
   I would expect OpenJarFile already must be tackling the jar-refresh issue 
and in that scenario your comment would be the best way to go forward with 
this. 
   
   Thanks again for your valuable time on this. I look forward for this 
optimization to get shipped soon :) 
   




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



[GitHub] [tomcat] kamnani commented on pull request #351: Remove White Spaces from the JSP files

2020-09-22 Thread GitBox


kamnani commented on pull request #351:
URL: https://github.com/apache/tomcat/pull/351#issuecomment-696807874


   @markt-asf 
   
   I am sure you wouldn't be able to test this on proprietary code, because 
that will generate empty outputs/compile-errors after stripping out the 
important lines.
   
   I am attaching the JSP from the tomcat code itself, and the results will be 
quite evident once you use the flag in this PR. 
   
   This is the index.jsp file from the ROOT web application in tomcat's code. 
You can use both the parameters and see the difference they exhibit. Also, do 
make sure to clear out the work folder after testing any of the parameter just 
to clear out the cache. 
   
   ```
   <%--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
   
   http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   --%>
   <%@ page session="false" pageEncoding="UTF-8" contentType="text/html; 
charset=UTF-8" %>
   <%
   java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("");
   request.setAttribute("year", sdf.format(new java.util.Date()));
   request.setAttribute("tomcatUrl", "https://tomcat.apache.org/;);
   request.setAttribute("tomcatDocUrl", "/docs/");
   request.setAttribute("tomcatExamplesUrl", "/examples/");
   %>
   
   
   
   
   <%=request.getServletContext().getServerInfo() %>
   
   
   
   
   
   
   
   
   Home
   Documentation
   Configuration
   Examples
   https://wiki.apache.org/tomcat/FrontPage;>Wiki
   Mailing Lists
   Find 
Help
   
   
   
   ${pageContext.servletContext.serverInfo}
   
   
   
   If you're seeing this, you've successfully installed 
Tomcat. Congratulations!
   
   
   
   
   Recommended Reading:
   Security Considerations 
How-To
   Manager Application How-To
   Clustering/Session Replication 
How-To
   
   
   
   
   Server Status
   
   
   Manager App
   
   
   Host Manager
   
   
   
   
   
   Developer Quick Start
   
   
   Tomcat 
Setup
   First Web 
Application
   
   
   
   
   Realms 
 AAA
   JDBC 
DataSources
   
   
   
   
   Examples
   
   
   
   
   https://wiki.apache.org/tomcat/Specifications;>Servlet 
Specifications
   https://wiki.apache.org/tomcat/TomcatVersions;>Tomcat Versions
   
   
   
   
   
   
   
   Managing Tomcat
   For security, access to the manager webapp is restricted.
   Users are defined in:
   $CATALINA_HOME/conf/tomcat-users.xml
   In Tomcat 10.0 access to the manager application 
is split between
  different users.  Read more...
   
   Release Notes
   Changelog
   Migration 
Guide
   Security 
Notices
   
   
   
   
   Documentation
   Tomcat 10.0 

Re: WsFilter is missing destroy method

2020-09-22 Thread Ralph Goers
Thanks, That took care of the problem. I was using an older version of the 
servlet-api jar that wasn’t marked “provided”.

Ralph

> On Sep 21, 2020, at 11:15 PM, Apache  wrote:
> 
> Interesting. Thanks, I will check in the morning.
> 
> Ralph
> 
>> On Sep 21, 2020, at 10:31 PM, Romain Manni-Bucau  
>> wrote:
>> 
>> Hi Ralph,
>> 
>> Did you check your api jar was matching tomcat impl version? destroy is in
>> the interface (default method):
>> https://github.com/apache/tomcat/blob/9.0.x/java/javax/servlet/Filter.java#L119
>> So without more details it sounds you have a dependency conflict or
>> outdated import.
>> 
>> Romain Manni-Bucau
>> @rmannibucau  |  Blog
>>  | Old Blog
>>  | Github  
>> |
>> LinkedIn  | Book
>> 
>> 
>> 
>>> Le mar. 22 sept. 2020 à 07:22, Ralph Goers  a écrit :
>>> 
>>> I don’t understand why
>>> https://bz.apache.org/bugzilla/show_bug.cgi?id=63528 <
>>> https://bz.apache.org/bugzilla/show_bug.cgi?id=63528> was closed with the
>>> comment “bugzilla is not a support forum”.  Where else is one supposed to
>>> report bugs in Tomcat as this is a legitimate bug?  It seems that WsFilter
>>> and GenericFilter were modified around the same time and at various points
>>> in time one or the other had a destroy method, but in the end neither did
>>> and it results in an error whenever the embedded tomcat in Spring Boot
>>> shuts down. This bug still exists in 9.0.38.
>>> 
>>> Ralph
> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 



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



buildbot failure in on tomcat-9-trunk

2020-09-22 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-9-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-9-trunk/builds/457

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

Buildslave for this Build: asf946_ubuntu

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

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



[GitHub] [tomcat] rmaucher commented on pull request #352: Optimizing Resource Lookup using Bloom Filter

2020-09-22 Thread GitBox


rmaucher commented on pull request #352:
URL: https://github.com/apache/tomcat/pull/352#issuecomment-696769628


   I made the change to use the Context instead of the Host, no issue there.
   However, I'm not ok with the proposed changes as is. The problem for me is 
that I don't understand the weird code added to AbstractArchiveResourceSet. I 
am ok with adding the creation of that JarContents filter in openJarFile() 
[even with the sync ...], basically, but not elsewhere, and without the strange 
custom refresh mechanism on lookup.
   Then, since it is *likely* quite harmless, it could be enabled by default 
(and maybe the flag can be removed altogether ...).



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



[GitHub] [tomcat] jbampton commented on pull request #361: Add a GitHub action to lint the Markdown and YAML files.

2020-09-22 Thread GitBox


jbampton commented on pull request #361:
URL: https://github.com/apache/tomcat/pull/361#issuecomment-696741586


   Hey @markt-asf what do you think about this PR ?



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



[GitHub] [tomcat] markt-asf closed pull request #367: HTML URL must match RemoteAddrValve allow pattern

2020-09-22 Thread GitBox


markt-asf closed pull request #367:
URL: https://github.com/apache/tomcat/pull/367


   



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



[GitHub] [tomcat] markt-asf commented on pull request #367: HTML URL must match RemoteAddrValve allow pattern

2020-09-22 Thread GitBox


markt-asf commented on pull request #367:
URL: https://github.com/apache/tomcat/pull/367#issuecomment-696733828


   The premise of this PR is incorrect. The allow pattern in the 
`RemoteAddrValve` has no relationship to the host name used to access the 
Tomcat instance. The pattern is matched against the client IP address.



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 8.5.x updated: Fix double counting in tracking of in-flight async requests

2020-09-22 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 78d9c76  Fix double counting in tracking of in-flight async requests
78d9c76 is described below

commit 78d9c76333214c752ebdd108677925dad6bdc585
Author: Mark Thomas 
AuthorDate: Tue Sep 22 14:40:58 2020 +0100

Fix double counting in tracking of in-flight async requests
---
 java/org/apache/catalina/core/AsyncContextImpl.java | 19 ---
 java/org/apache/coyote/AsyncContextCallback.java| 20 ++--
 java/org/apache/coyote/AsyncStateMachine.java   | 12 
 webapps/docs/changelog.xml  |  5 +
 4 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/catalina/core/AsyncContextImpl.java 
b/java/org/apache/catalina/core/AsyncContextImpl.java
index 05743b8..90851b0 100644
--- a/java/org/apache/catalina/core/AsyncContextImpl.java
+++ b/java/org/apache/catalina/core/AsyncContextImpl.java
@@ -113,7 +113,6 @@ public class AsyncContextImpl implements AsyncContext, 
AsyncContextCallback {
 } finally {
 context.fireRequestDestroyEvent(request.getRequest());
 clearServletRequestResponse();
-this.context.decrementInProgressAsyncCount();
 context.unbind(Globals.IS_SECURITY_ENABLED, oldCL);
 }
 }
@@ -206,16 +205,10 @@ public class AsyncContextImpl implements AsyncContext, 
AsyncContextCallback {
 (AsyncDispatcher) requestDispatcher;
 final ServletRequest servletRequest = getRequest();
 final ServletResponse servletResponse = getResponse();
-// https://bz.apache.org/bugzilla/show_bug.cgi?id=63246
-// Take a local copy as the dispatch may complete the
-// request/response and that in turn may trigger recycling of this
-// object before the in-progress count can be decremented
-final Context context = this.context;
 this.dispatch = new AsyncRunnable(
 request, applicationDispatcher, servletRequest, 
servletResponse);
 this.request.getCoyoteRequest().action(ActionCode.ASYNC_DISPATCH, 
null);
 clearServletRequestResponse();
-context.decrementInProgressAsyncCount();
 }
 }
 
@@ -457,6 +450,18 @@ public class AsyncContextImpl implements AsyncContext, 
AsyncContextCallback {
 }
 
 
+@Override
+public void incrementInProgressAsyncCount() {
+context.incrementInProgressAsyncCount();
+}
+
+
+@Override
+public void decrementInProgressAsyncCount() {
+context.decrementInProgressAsyncCount();
+}
+
+
 private void logDebug(String method) {
 String rHashCode;
 String crHashCode;
diff --git a/java/org/apache/coyote/AsyncContextCallback.java 
b/java/org/apache/coyote/AsyncContextCallback.java
index c657306..d3119af 100644
--- a/java/org/apache/coyote/AsyncContextCallback.java
+++ b/java/org/apache/coyote/AsyncContextCallback.java
@@ -23,7 +23,7 @@ package org.apache.coyote;
  * org.apache.catalina package.
  */
 public interface AsyncContextCallback {
-public void fireOnComplete();
+void fireOnComplete();
 
 /**
  * Reports if the web application associated with this async request is
@@ -32,5 +32,21 @@ public interface AsyncContextCallback {
  * @return {@code true} if the associated web application is available,
  * otherwise {@code false}
  */
-public boolean isAvailable();
+boolean isAvailable();
+
+/**
+ * Used to notify the Context that async processing has started.
+ * Specifically, for the counting of in-progress async requests to work
+ * correctly, this must be called exactly once every time the
+ * {@link AsyncStateMachine} transitions from DISPATCHED to any other 
state.
+ */
+void incrementInProgressAsyncCount();
+
+/**
+ * Used to notify the Context that async processing has ended.
+ * Specifically, for the counting of in-progress async requests to work
+ * correctly, this must be called exactly once every time the
+ * {@link AsyncStateMachine} transitions to DISPATCHED from any other 
state.
+ */
+void decrementInProgressAsyncCount();
 }
diff --git a/java/org/apache/coyote/AsyncStateMachine.java 
b/java/org/apache/coyote/AsyncStateMachine.java
index bf32bf9..501012c 100644
--- a/java/org/apache/coyote/AsyncStateMachine.java
+++ b/java/org/apache/coyote/AsyncStateMachine.java
@@ -235,6 +235,9 @@ public class AsyncStateMachine {
 if (state == AsyncState.DISPATCHED) {
 generation.incrementAndGet();
 state = AsyncState.STARTING;
+// Note: In this instance, caller is responsible for calling
+// 

[tomcat] branch master updated: Fix double counting in tracking of in-flight async requests

2020-09-22 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 6d44f6a  Fix double counting in tracking of in-flight async requests
6d44f6a is described below

commit 6d44f6aa52748df930f1563bb5598705eb75e1aa
Author: Mark Thomas 
AuthorDate: Tue Sep 22 14:40:58 2020 +0100

Fix double counting in tracking of in-flight async requests
---
 java/org/apache/catalina/core/AsyncContextImpl.java | 19 ---
 java/org/apache/coyote/AsyncContextCallback.java| 20 ++--
 java/org/apache/coyote/AsyncStateMachine.java   | 12 
 webapps/docs/changelog.xml  |  5 +
 4 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/catalina/core/AsyncContextImpl.java 
b/java/org/apache/catalina/core/AsyncContextImpl.java
index 4d2dc4c..b332922 100644
--- a/java/org/apache/catalina/core/AsyncContextImpl.java
+++ b/java/org/apache/catalina/core/AsyncContextImpl.java
@@ -114,7 +114,6 @@ public class AsyncContextImpl implements AsyncContext, 
AsyncContextCallback {
 } finally {
 context.fireRequestDestroyEvent(request.getRequest());
 clearServletRequestResponse();
-this.context.decrementInProgressAsyncCount();
 context.unbind(Globals.IS_SECURITY_ENABLED, oldCL);
 }
 }
@@ -207,16 +206,10 @@ public class AsyncContextImpl implements AsyncContext, 
AsyncContextCallback {
 (AsyncDispatcher) requestDispatcher;
 final ServletRequest servletRequest = getRequest();
 final ServletResponse servletResponse = getResponse();
-// https://bz.apache.org/bugzilla/show_bug.cgi?id=63246
-// Take a local copy as the dispatch may complete the
-// request/response and that in turn may trigger recycling of this
-// object before the in-progress count can be decremented
-final Context context = this.context;
 this.dispatch = new AsyncRunnable(
 request, applicationDispatcher, servletRequest, 
servletResponse);
 this.request.getCoyoteRequest().action(ActionCode.ASYNC_DISPATCH, 
null);
 clearServletRequestResponse();
-context.decrementInProgressAsyncCount();
 }
 }
 
@@ -458,6 +451,18 @@ public class AsyncContextImpl implements AsyncContext, 
AsyncContextCallback {
 }
 
 
+@Override
+public void incrementInProgressAsyncCount() {
+context.incrementInProgressAsyncCount();
+}
+
+
+@Override
+public void decrementInProgressAsyncCount() {
+context.decrementInProgressAsyncCount();
+}
+
+
 private void logDebug(String method) {
 String rHashCode;
 String crHashCode;
diff --git a/java/org/apache/coyote/AsyncContextCallback.java 
b/java/org/apache/coyote/AsyncContextCallback.java
index c1d742f..9f9b925 100644
--- a/java/org/apache/coyote/AsyncContextCallback.java
+++ b/java/org/apache/coyote/AsyncContextCallback.java
@@ -23,7 +23,7 @@ package org.apache.coyote;
  * org.apache.catalina package.
  */
 public interface AsyncContextCallback {
-public void fireOnComplete();
+void fireOnComplete();
 
 /**
  * Reports if the web application associated with this async request is
@@ -32,5 +32,21 @@ public interface AsyncContextCallback {
  * @return {@code true} if the associated web application is available,
  * otherwise {@code false}
  */
-public boolean isAvailable();
+boolean isAvailable();
+
+/**
+ * Used to notify the Context that async processing has started.
+ * Specifically, for the counting of in-progress async requests to work
+ * correctly, this must be called exactly once every time the
+ * {@link AsyncStateMachine} transitions from DISPATCHED to any other 
state.
+ */
+void incrementInProgressAsyncCount();
+
+/**
+ * Used to notify the Context that async processing has ended.
+ * Specifically, for the counting of in-progress async requests to work
+ * correctly, this must be called exactly once every time the
+ * {@link AsyncStateMachine} transitions to DISPATCHED from any other 
state.
+ */
+void decrementInProgressAsyncCount();
 }
diff --git a/java/org/apache/coyote/AsyncStateMachine.java 
b/java/org/apache/coyote/AsyncStateMachine.java
index 7b28ad2..a993a39 100644
--- a/java/org/apache/coyote/AsyncStateMachine.java
+++ b/java/org/apache/coyote/AsyncStateMachine.java
@@ -235,6 +235,9 @@ class AsyncStateMachine {
 if (state == AsyncState.DISPATCHED) {
 generation.incrementAndGet();
 state = AsyncState.STARTING;
+// Note: In this instance, caller is responsible for calling
+// asyncCtxt.incrementInProgressAsyncCount() 

[tomcat] branch 9.0.x updated: Fix double counting in tracking of in-flight async requests

2020-09-22 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 31ca5a1  Fix double counting in tracking of in-flight async requests
31ca5a1 is described below

commit 31ca5a18baf97718a2e2288a7127bd67bb8d01cc
Author: Mark Thomas 
AuthorDate: Tue Sep 22 14:40:58 2020 +0100

Fix double counting in tracking of in-flight async requests
---
 java/org/apache/catalina/core/AsyncContextImpl.java | 19 ---
 java/org/apache/coyote/AsyncContextCallback.java| 20 ++--
 java/org/apache/coyote/AsyncStateMachine.java   | 12 
 webapps/docs/changelog.xml  |  5 +
 4 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/catalina/core/AsyncContextImpl.java 
b/java/org/apache/catalina/core/AsyncContextImpl.java
index 05743b8..90851b0 100644
--- a/java/org/apache/catalina/core/AsyncContextImpl.java
+++ b/java/org/apache/catalina/core/AsyncContextImpl.java
@@ -113,7 +113,6 @@ public class AsyncContextImpl implements AsyncContext, 
AsyncContextCallback {
 } finally {
 context.fireRequestDestroyEvent(request.getRequest());
 clearServletRequestResponse();
-this.context.decrementInProgressAsyncCount();
 context.unbind(Globals.IS_SECURITY_ENABLED, oldCL);
 }
 }
@@ -206,16 +205,10 @@ public class AsyncContextImpl implements AsyncContext, 
AsyncContextCallback {
 (AsyncDispatcher) requestDispatcher;
 final ServletRequest servletRequest = getRequest();
 final ServletResponse servletResponse = getResponse();
-// https://bz.apache.org/bugzilla/show_bug.cgi?id=63246
-// Take a local copy as the dispatch may complete the
-// request/response and that in turn may trigger recycling of this
-// object before the in-progress count can be decremented
-final Context context = this.context;
 this.dispatch = new AsyncRunnable(
 request, applicationDispatcher, servletRequest, 
servletResponse);
 this.request.getCoyoteRequest().action(ActionCode.ASYNC_DISPATCH, 
null);
 clearServletRequestResponse();
-context.decrementInProgressAsyncCount();
 }
 }
 
@@ -457,6 +450,18 @@ public class AsyncContextImpl implements AsyncContext, 
AsyncContextCallback {
 }
 
 
+@Override
+public void incrementInProgressAsyncCount() {
+context.incrementInProgressAsyncCount();
+}
+
+
+@Override
+public void decrementInProgressAsyncCount() {
+context.decrementInProgressAsyncCount();
+}
+
+
 private void logDebug(String method) {
 String rHashCode;
 String crHashCode;
diff --git a/java/org/apache/coyote/AsyncContextCallback.java 
b/java/org/apache/coyote/AsyncContextCallback.java
index c657306..d3119af 100644
--- a/java/org/apache/coyote/AsyncContextCallback.java
+++ b/java/org/apache/coyote/AsyncContextCallback.java
@@ -23,7 +23,7 @@ package org.apache.coyote;
  * org.apache.catalina package.
  */
 public interface AsyncContextCallback {
-public void fireOnComplete();
+void fireOnComplete();
 
 /**
  * Reports if the web application associated with this async request is
@@ -32,5 +32,21 @@ public interface AsyncContextCallback {
  * @return {@code true} if the associated web application is available,
  * otherwise {@code false}
  */
-public boolean isAvailable();
+boolean isAvailable();
+
+/**
+ * Used to notify the Context that async processing has started.
+ * Specifically, for the counting of in-progress async requests to work
+ * correctly, this must be called exactly once every time the
+ * {@link AsyncStateMachine} transitions from DISPATCHED to any other 
state.
+ */
+void incrementInProgressAsyncCount();
+
+/**
+ * Used to notify the Context that async processing has ended.
+ * Specifically, for the counting of in-progress async requests to work
+ * correctly, this must be called exactly once every time the
+ * {@link AsyncStateMachine} transitions to DISPATCHED from any other 
state.
+ */
+void decrementInProgressAsyncCount();
 }
diff --git a/java/org/apache/coyote/AsyncStateMachine.java 
b/java/org/apache/coyote/AsyncStateMachine.java
index 7b28ad2..a993a39 100644
--- a/java/org/apache/coyote/AsyncStateMachine.java
+++ b/java/org/apache/coyote/AsyncStateMachine.java
@@ -235,6 +235,9 @@ class AsyncStateMachine {
 if (state == AsyncState.DISPATCHED) {
 generation.incrementAndGet();
 state = AsyncState.STARTING;
+// Note: In this instance, caller is responsible for calling
+// asyncCtxt.incrementInProgressAsyncCount() as 

[GitHub] [tomcat] markt-asf commented on pull request #362: Fix spelling

2020-09-22 Thread GitBox


markt-asf commented on pull request #362:
URL: https://github.com/apache/tomcat/pull/362#issuecomment-696726509


   Great. Thanks for the confirmation. On that basis, I am going to close the 
PR. Thanks for all the fixes.



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



[GitHub] [tomcat] markt-asf closed pull request #362: Fix spelling

2020-09-22 Thread GitBox


markt-asf closed pull request #362:
URL: https://github.com/apache/tomcat/pull/362


   



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



[GitHub] [tomcat] jbampton commented on pull request #362: Fix spelling

2020-09-22 Thread GitBox


jbampton commented on pull request #362:
URL: https://github.com/apache/tomcat/pull/362#issuecomment-696680907


   Hey @markt-asf I just rebased and we have 20 files changed only in the 
`.xsd` files. 
   
   Seems to be the same twenty that was in your list.
   
   



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



[Bug 63815] Expansion of JAVA_OPTS in catalina.sh containing '*' stops startup on linux

2020-09-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63815

--- Comment #16 from Mark Thomas  ---
This has been fixed in the main development branch for openjdk 16. The fix
should be in the next EA release.

There is currently no information on whether or not the fix will be
back-ported.

Once the catalina.sh fix is applied, debug won't work unless either:
a) A JDK that includes the JDK fix is used; or
b) the changes in catalina.sh are reverted

So the question is, when do we apply the catalina.sh fix?
- As soon as a 16 EA release is available with the fix?
- As soon as a 16 GA release is available with the fix?
- As soon as an LTS release is available with the fix?
- As soon the minimum version of Java required by the major Tomcat version is
guaranteed to include the JDK fix?

Those time ranges run from a few days to years in the future. None of those
options are appealing.

I'm currently thinking of the following:
- apply the catalina.sh fix once there is an 16 EA release with the JDK fix
- introduce a new command "debug-legacy" that invokes jdb assuming the JDK fix
is not present
- remove debug legacy once the minimum Java version required by the Tomcat
major version is guaranteed to include the JDK fix.


I don't like maintaining what is essentially two versions of invoking jdb but I
don't see a better plan.

-- 
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-jakartaee-migration] branch master updated: Fix warning

2020-09-22 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-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new c05cc61  Fix warning
c05cc61 is described below

commit c05cc614f4e5942b264309f110eb3a8e0bbc7134
Author: remm 
AuthorDate: Tue Sep 22 09:30:53 2020 +0200

Fix warning
---
 .../org/apache/tomcat/jakartaee/MigrationTest.java   | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java 
b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
index 418b57f..0e0ba2a 100644
--- a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
+++ b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java
@@ -157,11 +157,12 @@ public class MigrationTest {
 assertEquals("jakarta.servlet.CommonGatewayInterface", 
cls.getSuperclass().getName());
 
 // check the modification of the Implementation-Version manifest 
attribute
-JarFile jar = new JarFile(jarFile);
-String implementationVersion = 
jar.getManifest().getMainAttributes().getValue("Implementation-Version");
-assertNotNull("Missing Implementation-Version manifest attribute", 
implementationVersion);
-assertNotEquals("Implementation-Version manifest attribute not 
changed", "1.2.3", implementationVersion);
-assertTrue("Implementation-Version manifest attribute doesn't match 
the expected pattern", 
implementationVersion.matches("1\\.2\\.3-migrated-[\\d\\.]+.*"));
+try (JarFile jar = new JarFile(jarFile)) {
+String implementationVersion = 
jar.getManifest().getMainAttributes().getValue("Implementation-Version");
+assertNotNull("Missing Implementation-Version manifest attribute", 
implementationVersion);
+assertNotEquals("Implementation-Version manifest attribute not 
changed", "1.2.3", implementationVersion);
+assertTrue("Implementation-Version manifest attribute doesn't 
match the expected pattern", 
implementationVersion.matches("1\\.2\\.3-migrated-[\\d\\.]+.*"));
+}
 }
 
 @Test
@@ -187,9 +188,10 @@ public class MigrationTest {
 migration.setDestination(jarFile);
 migration.execute();
 
-JarFile jar = new JarFile(jarFile);
-assertNull("Digest not removed from the manifest", 
jar.getManifest().getAttributes("org/apache/tomcat/jakartaee/HelloCGI.class"));
-assertNull("Signature key not removed", jar.getEntry("META-INF/" + 
algorithm.toUpperCase() + "." + algorithm.toUpperCase()));
-assertNull("Signed manifest not removed", jar.getEntry("META-INF/" + 
algorithm.toUpperCase() + ".SF"));
+try (JarFile jar = new JarFile(jarFile)) {
+assertNull("Digest not removed from the manifest", 
jar.getManifest().getAttributes("org/apache/tomcat/jakartaee/HelloCGI.class"));
+assertNull("Signature key not removed", jar.getEntry("META-INF/" + 
algorithm.toUpperCase() + "." + algorithm.toUpperCase()));
+assertNull("Signed manifest not removed", jar.getEntry("META-INF/" 
+ algorithm.toUpperCase() + ".SF"));
+}
 }
 }


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



[tomcat-jakartaee-migration] branch master updated: Improve tests results

2020-09-22 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-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
 new 5bf42bb  Improve tests results
5bf42bb is described below

commit 5bf42bb3139f82e61b5098344e997e339ef14644
Author: remm 
AuthorDate: Tue Sep 22 09:30:26 2020 +0200

Improve tests results

migrateFile just ignores if the destination exists, so migrateDirectory
could do that as well.
---
 src/main/java/org/apache/tomcat/jakartaee/Migration.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java 
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index b297747..69a23c0 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -99,7 +99,7 @@ public class Migration {
 boolean result = true;
 long t1 = System.nanoTime();
 if (source.isDirectory()) {
-if (destination.mkdirs()) {
+if ((destination.exists() && destination.isDirectory()) || 
destination.mkdirs()) {
 result = result && migrateDirectory(source, destination);
 } else {
 logger.log(Level.WARNING, sm.getString("migration.mkdirError", 
destination.getAbsolutePath()));
@@ -129,7 +129,7 @@ public class Migration {
 File srcFile = new File(src, file);
 File destFile = new File(dest, file);
 if (srcFile.isDirectory()) {
-if (destFile.mkdir()) {
+if ((destFile.exists() && destFile.isDirectory()) || 
destFile.mkdir()) {
 result = result && migrateDirectory(srcFile, destFile);
 } else {
 logger.log(Level.WARNING, 
sm.getString("migration.mkdirError", destFile.getAbsolutePath()));


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



Re: Application-accesible Executors

2020-09-22 Thread Romain Manni-Bucau
Le mar. 22 sept. 2020 à 08:54, Martin Grigorov  a
écrit :

> Hi Chris,
>
> On Fri, Sep 18, 2020 at 7:10 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > All,
> >
> > I've recently been thinking about application uses of servlet-async and
> > Websocket for long-running operations, or really for any interactions
> > where you want to allow the request-processing thread to go back into
> > the pool, but the application is still doing useful things and therefore
> > needs its own thread.
> >
> > I'm thinking of something like SwingUtilities.invokeLater, though that
> > does something very specific that is AWT-related, of course.
> >
> > I don't believe there is a (JavaEE/JakartaEE) standard for this, so I'm
> > interested in what others think might be a good idea from a Tomcat
> > standpoint.
> >
>
> I haven't used Java EE since version 5 but I do remember it having such
> utilities:
> https://docs.oracle.com/javaee/7/tutorial/concurrency-utilities.htm
>
>
> >
> >
> > It's fairly easy to do something like this in one's own web application,
> > maybe using a ServletContextListener:
> >
> > public class ExecutorProvider
> >   implements ServletContextListener
> > {
> >   public static final EXECUTOR_SERVICE_KEY = "executor-service";
> >
> >   private ExecutorService _svc;
> >
> >   public void contextInitialized(ServletContext ctx) {
> > _svc = Executors.newFixedThreadPool(10); // ?
> >
> > ctx.setAttribute(EXECUTOR_SERVICE_KEY, _svc);
> >   }
> >
> >   public void contextDestroyed(ServletContext ctx) {
> > ctx.removeAttribute(EXECUTOR_SERVICE_KEY);
> > _svc.shutdown();
> >   }
> > }
> >
> > Then in a servlet, etc. you could:
> >
> >
> >
> ((ExecutorService)ctx.getAttribute(ExecutorProvider.EXECUTOR_SERVICE_KEY)).submit(new
> > Runnable() {
> > public void run() {
> > // your code goes here
> > }
> > });
> >
> > I'm wondering if there is scope here for Tomcat to provide this kind of
> > service for applications that want to opt-into one. Maybe the above is
> > so trivial as to not be worth it at all. But maybe it would be a nice
> >
>
> I agree - it is trivial.
> But also: does it work for everyone's use case ?
> Some will need a fixed pool for CPU bound tasks, others will need a cached
> pool for IO bound tasks, and others may need a scheduled pool ... And then
> you'll need to provide a way to name the threads ...
> Of course you can introduce pools of all types but is it easier to define
> them in XML (server.xml, context.xml) or in Java code (as you did above) ?
>

Hmm, a few points:

1. You are right, I think the only thing the mentionned impl does not
handle is the cached executor service but it is trivial to add (but has the
pitfall to make the app less deterministic), everything else is there.
2. Java code definition is trivial by nature (since it is java code) and
XML support is there too (tomee flavor:
https://tomee.apache.org/admin/configuration/resources.html#_managedexecutorservice,
tomcat one too since tomcat has a XML factory support - setters, factory
method etc, same as for datasources). Indeed it does not bring a specific
XML support (and I have to admit it is a very good thing) but it is coded
to be "XML factory friendly" so we are all good there, in particular in
Tomcat.
3. Assuming you don't go with the standard and share an impl @asf, wouldn't
you just redo exactly the same thing? Sounds like it is the proposed path
anyway, no? So probably better to make a single community rather than split
it since this part is pretty simple and stable IMHO.

Indeed, just my opinion but from my experience it is always trivial to
launch a new project, it is way harder to make it last in time in terms of
community, here spec helps and we can easily make it usable outside a full
EE container (ie just servlet container scope).


>
> My 2c
> Martin
>
>
> > service to provide to web applications, or maybe across multiple web
> > applications in some kind of group. Or it might survive context restarts
> > for some reason.
> >
> > Having this provided by Tomcat would allow admins to maybe override the
> > sizes of the thread pools and other details that the application then
> > wouldn't need to worry about.
> >
> > It might even tie-into Tomcat's utility-executor if that makes any sense
> > 0-- though we'd have to make sure it executes in the right ClassLoader
> > and/or security context.
> >
> > Any thoughts on this? Or is it really such a trivial thing as to not
> > really be useful to anyone. Maybe simply providing a
> > ServletContextListener class like the one above (with obvious robustness
> > improvements) that anyone could configure for their own application
> > would be sufficient/useful to users.
> >
> > -chris
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: dev-h...@tomcat.apache.org
> >
> >
>


Re: Application-accesible Executors

2020-09-22 Thread Martin Grigorov
Hi Chris,

On Fri, Sep 18, 2020 at 7:10 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> All,
>
> I've recently been thinking about application uses of servlet-async and
> Websocket for long-running operations, or really for any interactions
> where you want to allow the request-processing thread to go back into
> the pool, but the application is still doing useful things and therefore
> needs its own thread.
>
> I'm thinking of something like SwingUtilities.invokeLater, though that
> does something very specific that is AWT-related, of course.
>
> I don't believe there is a (JavaEE/JakartaEE) standard for this, so I'm
> interested in what others think might be a good idea from a Tomcat
> standpoint.
>

I haven't used Java EE since version 5 but I do remember it having such
utilities:
https://docs.oracle.com/javaee/7/tutorial/concurrency-utilities.htm


>
>
> It's fairly easy to do something like this in one's own web application,
> maybe using a ServletContextListener:
>
> public class ExecutorProvider
>   implements ServletContextListener
> {
>   public static final EXECUTOR_SERVICE_KEY = "executor-service";
>
>   private ExecutorService _svc;
>
>   public void contextInitialized(ServletContext ctx) {
> _svc = Executors.newFixedThreadPool(10); // ?
>
> ctx.setAttribute(EXECUTOR_SERVICE_KEY, _svc);
>   }
>
>   public void contextDestroyed(ServletContext ctx) {
> ctx.removeAttribute(EXECUTOR_SERVICE_KEY);
> _svc.shutdown();
>   }
> }
>
> Then in a servlet, etc. you could:
>
>
> ((ExecutorService)ctx.getAttribute(ExecutorProvider.EXECUTOR_SERVICE_KEY)).submit(new
> Runnable() {
> public void run() {
> // your code goes here
> }
> });
>
> I'm wondering if there is scope here for Tomcat to provide this kind of
> service for applications that want to opt-into one. Maybe the above is
> so trivial as to not be worth it at all. But maybe it would be a nice
>

I agree - it is trivial.
But also: does it work for everyone's use case ?
Some will need a fixed pool for CPU bound tasks, others will need a cached
pool for IO bound tasks, and others may need a scheduled pool ... And then
you'll need to provide a way to name the threads ...
Of course you can introduce pools of all types but is it easier to define
them in XML (server.xml, context.xml) or in Java code (as you did above) ?

My 2c
Martin


> service to provide to web applications, or maybe across multiple web
> applications in some kind of group. Or it might survive context restarts
> for some reason.
>
> Having this provided by Tomcat would allow admins to maybe override the
> sizes of the thread pools and other details that the application then
> wouldn't need to worry about.
>
> It might even tie-into Tomcat's utility-executor if that makes any sense
> 0-- though we'd have to make sure it executes in the right ClassLoader
> and/or security context.
>
> Any thoughts on this? Or is it really such a trivial thing as to not
> really be useful to anyone. Maybe simply providing a
> ServletContextListener class like the one above (with obvious robustness
> improvements) that anyone could configure for their own application
> would be sufficient/useful to users.
>
> -chris
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


Re: WsFilter is missing destroy method

2020-09-22 Thread Apache
Interesting. Thanks, I will check in the morning.

Ralph

> On Sep 21, 2020, at 10:31 PM, Romain Manni-Bucau  
> wrote:
> 
> Hi Ralph,
> 
> Did you check your api jar was matching tomcat impl version? destroy is in
> the interface (default method):
> https://github.com/apache/tomcat/blob/9.0.x/java/javax/servlet/Filter.java#L119
> So without more details it sounds you have a dependency conflict or
> outdated import.
> 
> Romain Manni-Bucau
> @rmannibucau  |  Blog
>  | Old Blog
>  | Github  |
> LinkedIn  | Book
> 
> 
> 
>> Le mar. 22 sept. 2020 à 07:22, Ralph Goers  a écrit :
>> 
>> I don’t understand why
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=63528 <
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=63528> was closed with the
>> comment “bugzilla is not a support forum”.  Where else is one supposed to
>> report bugs in Tomcat as this is a legitimate bug?  It seems that WsFilter
>> and GenericFilter were modified around the same time and at various points
>> in time one or the other had a destroy method, but in the end neither did
>> and it results in an error whenever the embedded tomcat in Spring Boot
>> shuts down. This bug still exists in 9.0.38.
>> 
>> Ralph



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