buildbot failure in on tomcat-9-trunk

2021-03-16 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/689

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] 4fa399a17fc97daad1772d02ea938c29a799464d
Blamelist: Mark Thomas 

BUILD FAILED: failed shell_8

Sincerely,
 -The Buildbot




-
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 debug for TestFlowControl as it appears to un unstable

2021-03-16 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 d1f1023  Add debug for TestFlowControl as it appears to un unstable
d1f1023 is described below

commit d1f1023b9b10b026844c1909672e6e5e9d880cbf
Author: Mark Thomas 
AuthorDate: Tue Mar 16 20:49:49 2021 +

Add debug for TestFlowControl as it appears to un unstable
---
 .../apache/coyote/http2/Http2UpgradeHandler.java   |   9 +-
 .../apache/coyote/http2/LocalStrings.properties|   2 +
 java/org/apache/coyote/http2/Stream.java   |   3 +
 test/org/apache/coyote/http2/TestFlowControl.java  | 154 +++--
 4 files changed, 93 insertions(+), 75 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 68fe75e..aa72fa0 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -1576,7 +1576,14 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 AbstractNonZeroStream abstractNonZeroStream = 
getAbstractNonZeroStream(streamId, true);
 abstractNonZeroStream.checkState(FrameType.DATA);
 abstractNonZeroStream.receivedData(payloadSize);
-return abstractNonZeroStream.getInputByteBuffer();
+ByteBuffer result = abstractNonZeroStream.getInputByteBuffer();
+
+if (log.isDebugEnabled()) {
+
log.debug(sm.getString("upgradeHandler.startRequestBodyFrame.result",
+getConnectionId(), abstractNonZeroStream.getIdAsString(), 
result));
+}
+
+return result;
 }
 
 
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index 1a006ae..3bd153f 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -95,6 +95,7 @@ stream.inputBuffer.empty=The Stream input buffer is empty. 
Waiting for more data
 stream.inputBuffer.readTimeout=Timeout waiting to read data from client
 stream.inputBuffer.reset=Stream reset
 stream.inputBuffer.signal=Data added to inBuffer when read thread is waiting. 
Signalling that thread to continue
+stream.inputBuffer.swallowUnread=Swallowing [{0}] bytes previous read into 
input stream buffer
 stream.notWritable=Connection [{0}], Stream [{1}], This stream is not writable
 stream.outputBuffer.flush.debug=Connection [{0}], Stream [{1}], flushing 
output with buffer at position [{2}], writeInProgress [{3}] and closed [{4}]
 stream.recycle=Connection [{0}], Stream [{1}] has been recycled
@@ -137,6 +138,7 @@ upgradeHandler.releaseBacklog=Connection [{0}], Stream 
[{1}] released from backl
 upgradeHandler.rst.debug=Connection [{0}], Stream [{1}], Error [{2}], Message 
[{3}],  RST (closing stream)
 upgradeHandler.sendPrefaceFail=Connection [{0}], Failed to send preface to 
client
 upgradeHandler.socketCloseFailed=Error closing socket
+upgradeHandler.startRequestBodyFrame.result=Connection [{0}], Stream [{1}] 
startRequestBodyFrame returned [{2}]
 upgradeHandler.stream.closed=Stream [{0}] has been closed for some time
 upgradeHandler.stream.even=A new remote stream ID of [{0}] was requested but 
all remote streams must use odd identifiers
 upgradeHandler.stream.notWritable=Connection [{0}], Stream [{1}], This stream 
is not writable
diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index a0110c0..6c2626e 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -1256,6 +1256,9 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 synchronized (inputBuffer) {
 closed = true;
 int unreadByteCount = inBuffer.position();
+if (log.isDebugEnabled()) {
+
log.debug(sm.getString("stream.inputBuffer.swallowUnread", 
Integer.valueOf(unreadByteCount)));
+}
 if (unreadByteCount > 0) {
 inBuffer.position(0);
 inBuffer.limit(inBuffer.limit() - unreadByteCount);
diff --git a/test/org/apache/coyote/http2/TestFlowControl.java 
b/test/org/apache/coyote/http2/TestFlowControl.java
index 950a790..4d08781 100644
--- a/test/org/apache/coyote/http2/TestFlowControl.java
+++ b/test/org/apache/coyote/http2/TestFlowControl.java
@@ -18,6 +18,8 @@ package org.apache.coyote.http2;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -32,90 +34,95 @@ public class TestFlowControl extends Http2TestBase {
 @Test
 public void 

[tomcat] branch 9.0.x updated: Add debug for TestFlowControl as it appears to un unstable

2021-03-16 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 4fa399a  Add debug for TestFlowControl as it appears to un unstable
4fa399a is described below

commit 4fa399a17fc97daad1772d02ea938c29a799464d
Author: Mark Thomas 
AuthorDate: Tue Mar 16 20:49:49 2021 +

Add debug for TestFlowControl as it appears to un unstable
---
 .../apache/coyote/http2/Http2UpgradeHandler.java   |   9 +-
 .../apache/coyote/http2/LocalStrings.properties|   2 +
 java/org/apache/coyote/http2/Stream.java   |   3 +
 test/org/apache/coyote/http2/TestFlowControl.java  | 154 +++--
 4 files changed, 93 insertions(+), 75 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 9ce6b1d..a247795 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -1469,7 +1469,14 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 AbstractNonZeroStream abstractNonZeroStream = 
getAbstractNonZeroStream(streamId, true);
 abstractNonZeroStream.checkState(FrameType.DATA);
 abstractNonZeroStream.receivedData(payloadSize);
-return abstractNonZeroStream.getInputByteBuffer();
+ByteBuffer result = abstractNonZeroStream.getInputByteBuffer();
+
+if (log.isDebugEnabled()) {
+
log.debug(sm.getString("upgradeHandler.startRequestBodyFrame.result",
+getConnectionId(), abstractNonZeroStream.getIdAsString(), 
result));
+}
+
+return result;
 }
 
 
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index a8e0a85..7e7fe63 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -96,6 +96,7 @@ stream.inputBuffer.empty=The Stream input buffer is empty. 
Waiting for more data
 stream.inputBuffer.readTimeout=Timeout waiting to read data from client
 stream.inputBuffer.reset=Stream reset
 stream.inputBuffer.signal=Data added to inBuffer when read thread is waiting. 
Signalling that thread to continue
+stream.inputBuffer.swallowUnread=Swallowing [{0}] bytes previous read into 
input stream buffer
 stream.notWritable=Connection [{0}], Stream [{1}], This stream is not writable
 stream.outputBuffer.flush.debug=Connection [{0}], Stream [{1}], flushing 
output with buffer at position [{2}], writeInProgress [{3}] and closed [{4}]
 stream.recycle=Connection [{0}], Stream [{1}] has been recycled
@@ -138,6 +139,7 @@ upgradeHandler.reset.receive=Connection [{0}], Stream 
[{1}], Reset received due
 upgradeHandler.rst.debug=Connection [{0}], Stream [{1}], Error [{2}], Message 
[{3}],  RST (closing stream)
 upgradeHandler.sendPrefaceFail=Connection [{0}], Failed to send preface to 
client
 upgradeHandler.socketCloseFailed=Error closing socket
+upgradeHandler.startRequestBodyFrame.result=Connection [{0}], Stream [{1}] 
startRequestBodyFrame returned [{2}]
 upgradeHandler.stream.closed=Stream [{0}] has been closed for some time
 upgradeHandler.stream.even=A new remote stream ID of [{0}] was requested but 
all remote streams must use odd identifiers
 upgradeHandler.stream.notWritable=Connection [{0}], Stream [{1}], This stream 
is not writable
diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 9fb2055..1cb6f97 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -1194,6 +1194,9 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 synchronized (inputBuffer) {
 closed = true;
 int unreadByteCount = inBuffer.position();
+if (log.isDebugEnabled()) {
+
log.debug(sm.getString("stream.inputBuffer.swallowUnread", 
Integer.valueOf(unreadByteCount)));
+}
 if (unreadByteCount > 0) {
 inBuffer.position(0);
 inBuffer.limit(inBuffer.limit() - unreadByteCount);
diff --git a/test/org/apache/coyote/http2/TestFlowControl.java 
b/test/org/apache/coyote/http2/TestFlowControl.java
index 950a790..4d08781 100644
--- a/test/org/apache/coyote/http2/TestFlowControl.java
+++ b/test/org/apache/coyote/http2/TestFlowControl.java
@@ -18,6 +18,8 @@ package org.apache.coyote.http2;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -32,90 +34,95 @@ public class TestFlowControl extends Http2TestBase {
 @Test
 public void 

[tomcat] branch master updated: Add debug for TestFlowControl as it appears to un unstable

2021-03-16 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 7114289  Add debug for TestFlowControl as it appears to un unstable
7114289 is described below

commit 7114289cd1b4152a1b71f785cd29d2a55c0127ef
Author: Mark Thomas 
AuthorDate: Tue Mar 16 20:49:49 2021 +

Add debug for TestFlowControl as it appears to un unstable
---
 .../apache/coyote/http2/Http2UpgradeHandler.java   |   9 +-
 .../apache/coyote/http2/LocalStrings.properties|   2 +
 java/org/apache/coyote/http2/Stream.java   |   3 +
 test/org/apache/coyote/http2/TestFlowControl.java  | 154 +++--
 4 files changed, 93 insertions(+), 75 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 641b258..dcc6c18 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -1469,7 +1469,14 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 AbstractNonZeroStream abstractNonZeroStream = 
getAbstractNonZeroStream(streamId, true);
 abstractNonZeroStream.checkState(FrameType.DATA);
 abstractNonZeroStream.receivedData(payloadSize);
-return abstractNonZeroStream.getInputByteBuffer();
+ByteBuffer result = abstractNonZeroStream.getInputByteBuffer();
+
+if (log.isDebugEnabled()) {
+
log.debug(sm.getString("upgradeHandler.startRequestBodyFrame.result",
+getConnectionId(), abstractNonZeroStream.getIdAsString(), 
result));
+}
+
+return result;
 }
 
 
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index a8e0a85..7e7fe63 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -96,6 +96,7 @@ stream.inputBuffer.empty=The Stream input buffer is empty. 
Waiting for more data
 stream.inputBuffer.readTimeout=Timeout waiting to read data from client
 stream.inputBuffer.reset=Stream reset
 stream.inputBuffer.signal=Data added to inBuffer when read thread is waiting. 
Signalling that thread to continue
+stream.inputBuffer.swallowUnread=Swallowing [{0}] bytes previous read into 
input stream buffer
 stream.notWritable=Connection [{0}], Stream [{1}], This stream is not writable
 stream.outputBuffer.flush.debug=Connection [{0}], Stream [{1}], flushing 
output with buffer at position [{2}], writeInProgress [{3}] and closed [{4}]
 stream.recycle=Connection [{0}], Stream [{1}] has been recycled
@@ -138,6 +139,7 @@ upgradeHandler.reset.receive=Connection [{0}], Stream 
[{1}], Reset received due
 upgradeHandler.rst.debug=Connection [{0}], Stream [{1}], Error [{2}], Message 
[{3}],  RST (closing stream)
 upgradeHandler.sendPrefaceFail=Connection [{0}], Failed to send preface to 
client
 upgradeHandler.socketCloseFailed=Error closing socket
+upgradeHandler.startRequestBodyFrame.result=Connection [{0}], Stream [{1}] 
startRequestBodyFrame returned [{2}]
 upgradeHandler.stream.closed=Stream [{0}] has been closed for some time
 upgradeHandler.stream.even=A new remote stream ID of [{0}] was requested but 
all remote streams must use odd identifiers
 upgradeHandler.stream.notWritable=Connection [{0}], Stream [{1}], This stream 
is not writable
diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 5929cda..37b1533 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -1194,6 +1194,9 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
 synchronized (inputBuffer) {
 closed = true;
 int unreadByteCount = inBuffer.position();
+if (log.isDebugEnabled()) {
+
log.debug(sm.getString("stream.inputBuffer.swallowUnread", 
Integer.valueOf(unreadByteCount)));
+}
 if (unreadByteCount > 0) {
 inBuffer.position(0);
 inBuffer.limit(inBuffer.limit() - unreadByteCount);
diff --git a/test/org/apache/coyote/http2/TestFlowControl.java 
b/test/org/apache/coyote/http2/TestFlowControl.java
index 950a790..4d08781 100644
--- a/test/org/apache/coyote/http2/TestFlowControl.java
+++ b/test/org/apache/coyote/http2/TestFlowControl.java
@@ -18,6 +18,8 @@ package org.apache.coyote.http2;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -32,90 +34,95 @@ public class TestFlowControl extends Http2TestBase {
 @Test
 public void 

buildbot success in on tomcat-trunk

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

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

Buildslave for this Build: asf946_ubuntu

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

Build succeeded!

Sincerely,
 -The Buildbot




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



[GitHub] [tomcat] markt-asf closed pull request #351: Remove White Spaces from the JSP files

2021-03-16 Thread GitBox


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


   



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 #351: Remove White Spaces from the JSP files

2021-03-16 Thread GitBox


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


   I've added this to 10.0.x and 9.0.x with a few changes. The notable changes 
were:
   
   - configured via a new `trimSpaces` value of `extended` rather than a new 
option
   - also removed leading and trailing whitespace from template text
   - tests check behaviour with and without configuration option enabled
   - formatting tweaks



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 9.0.x updated: Add extended option to trimSpaces

2021-03-16 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 96f986a  Add extended option to trimSpaces
96f986a is described below

commit 96f986a392f99c6f0d9fe3e18bc605a4f0e0a15d
Author: Mark Thomas 
AuthorDate: Tue Mar 16 17:47:23 2021 +

Add extended option to trimSpaces
---
 java/org/apache/jasper/Options.java|  7 ++-
 java/org/apache/jasper/TrimSpacesOption.java   |  3 +-
 java/org/apache/jasper/compiler/Compiler.java  |  8 +++-
 java/org/apache/jasper/compiler/Generator.java | 22 +
 .../compiler/NewlineReductionServletWriter.java| 54 ++
 test/org/apache/jasper/compiler/TestGenerator.java | 52 -
 test/webapp/jsp/trim-spaces-extended.jsp   | 49 
 webapps/docs/changelog.xml |  7 +++
 webapps/docs/jasper-howto.xml  | 11 +++--
 9 files changed, 204 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/jasper/Options.java 
b/java/org/apache/jasper/Options.java
index 248750a..32e59fd 100644
--- a/java/org/apache/jasper/Options.java
+++ b/java/org/apache/jasper/Options.java
@@ -101,8 +101,11 @@ public interface Options {
  * @return {@link TrimSpacesOption#TRUE} to remove template text that
  * consists only of whitespace from the output completely,
  * {@link TrimSpacesOption#SINGLE} to replace such template text
- * with a single space or {@link TrimSpacesOption#FALSE} to leave
- * such template text unchanged
+ * with a single space, {@link TrimSpacesOption#FALSE} to leave
+ * such template text unchanged or {@link 
TrimSpacesOption#EXTENDED}
+ * to remove template text that consists only of whitespace and to
+ * replace any sequence of whitespace and new lines within template
+ * text with a single new line.
  */
 public TrimSpacesOption getTrimSpaces();
 
diff --git a/java/org/apache/jasper/TrimSpacesOption.java 
b/java/org/apache/jasper/TrimSpacesOption.java
index faf7476..2890aa3 100644
--- a/java/org/apache/jasper/TrimSpacesOption.java
+++ b/java/org/apache/jasper/TrimSpacesOption.java
@@ -19,5 +19,6 @@ package org.apache.jasper;
 public enum TrimSpacesOption {
 FALSE,
 TRUE,
-SINGLE
+SINGLE,
+EXTENDED
 }
diff --git a/java/org/apache/jasper/compiler/Compiler.java 
b/java/org/apache/jasper/compiler/Compiler.java
index 81c9fc1..ac6f321 100644
--- a/java/org/apache/jasper/compiler/Compiler.java
+++ b/java/org/apache/jasper/compiler/Compiler.java
@@ -32,6 +32,7 @@ import java.util.Map.Entry;
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
 import org.apache.jasper.Options;
+import org.apache.jasper.TrimSpacesOption;
 import org.apache.jasper.servlet.JspServletWrapper;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -316,7 +317,12 @@ public abstract class Compiler {
 javaEncoding);
 }
 
-writer = new ServletWriter(new PrintWriter(osw));
+if ((ctxt!=null) && 
ctxt.getOptions().getTrimSpaces().equals(TrimSpacesOption.EXTENDED)) {
+writer = new NewlineReductionServletWriter(new PrintWriter(osw));
+} else {
+writer = new ServletWriter(new PrintWriter(osw));
+}
+
 ctxt.setWriter(writer);
 return writer;
 }
diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 7be9edb..e51c93f 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -40,6 +40,8 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.TimeZone;
 import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import javax.el.MethodExpression;
 import javax.el.ValueExpression;
@@ -52,6 +54,7 @@ import org.apache.el.util.JreCompat;
 import org.apache.jasper.Constants;
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
+import org.apache.jasper.TrimSpacesOption;
 import org.apache.jasper.compiler.Node.NamedAttribute;
 import org.apache.jasper.runtime.JspRuntimeLibrary;
 import org.xml.sax.Attributes;
@@ -97,6 +100,10 @@ class Generator {
 "org.apache.jasper.compiler.Generator.STRICT_GET_PROPERTY",
 "true"));
 
+private static final Pattern PRE_TAG_PATTERN = 
Pattern.compile("(?s).*(|).*");
+
+private static final Pattern BLANK_LINE_PATTERN = 
Pattern.compile("(\\s*(\\n|\\r)+\\s*)");
+
 private final ServletWriter out;
 
 private final ArrayList methodsBuffered;
@@ -2110,6 +2117,21 @@ class Generator {
 public void 

[tomcat] branch master updated: Add extended option to trimSpaces

2021-03-16 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 9484496  Add extended option to trimSpaces
9484496 is described below

commit 94844961e76ccee6fcfb829dfeb842beaa5ea8ab
Author: Mark Thomas 
AuthorDate: Tue Mar 16 17:47:23 2021 +

Add extended option to trimSpaces
---
 java/org/apache/jasper/Options.java|  7 ++-
 java/org/apache/jasper/TrimSpacesOption.java   |  3 +-
 java/org/apache/jasper/compiler/Compiler.java  |  8 +++-
 java/org/apache/jasper/compiler/Generator.java | 22 +
 .../compiler/NewlineReductionServletWriter.java| 54 ++
 test/org/apache/jasper/compiler/TestGenerator.java | 52 -
 test/webapp/jsp/trim-spaces-extended.jsp   | 49 
 webapps/docs/changelog.xml |  7 +++
 webapps/docs/jasper-howto.xml  | 11 +++--
 9 files changed, 204 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/jasper/Options.java 
b/java/org/apache/jasper/Options.java
index 19f3947..5f8d6da 100644
--- a/java/org/apache/jasper/Options.java
+++ b/java/org/apache/jasper/Options.java
@@ -101,8 +101,11 @@ public interface Options {
  * @return {@link TrimSpacesOption#TRUE} to remove template text that
  * consists only of whitespace from the output completely,
  * {@link TrimSpacesOption#SINGLE} to replace such template text
- * with a single space or {@link TrimSpacesOption#FALSE} to leave
- * such template text unchanged
+ * with a single space, {@link TrimSpacesOption#FALSE} to leave
+ * such template text unchanged or {@link 
TrimSpacesOption#EXTENDED}
+ * to remove template text that consists only of whitespace and to
+ * replace any sequence of whitespace and new lines within template
+ * text with a single new line.
  */
 public TrimSpacesOption getTrimSpaces();
 
diff --git a/java/org/apache/jasper/TrimSpacesOption.java 
b/java/org/apache/jasper/TrimSpacesOption.java
index faf7476..2890aa3 100644
--- a/java/org/apache/jasper/TrimSpacesOption.java
+++ b/java/org/apache/jasper/TrimSpacesOption.java
@@ -19,5 +19,6 @@ package org.apache.jasper;
 public enum TrimSpacesOption {
 FALSE,
 TRUE,
-SINGLE
+SINGLE,
+EXTENDED
 }
diff --git a/java/org/apache/jasper/compiler/Compiler.java 
b/java/org/apache/jasper/compiler/Compiler.java
index 2d5cda8..e2a2fcd 100644
--- a/java/org/apache/jasper/compiler/Compiler.java
+++ b/java/org/apache/jasper/compiler/Compiler.java
@@ -32,6 +32,7 @@ import java.util.Map.Entry;
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
 import org.apache.jasper.Options;
+import org.apache.jasper.TrimSpacesOption;
 import org.apache.jasper.servlet.JspServletWrapper;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -316,7 +317,12 @@ public abstract class Compiler {
 javaEncoding);
 }
 
-writer = new ServletWriter(new PrintWriter(osw));
+if ((ctxt!=null) && 
ctxt.getOptions().getTrimSpaces().equals(TrimSpacesOption.EXTENDED)) {
+writer = new NewlineReductionServletWriter(new PrintWriter(osw));
+} else {
+writer = new ServletWriter(new PrintWriter(osw));
+}
+
 ctxt.setWriter(writer);
 return writer;
 }
diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index efd5485..8d0af63 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -40,6 +40,8 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.TimeZone;
 import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import jakarta.el.MethodExpression;
 import jakarta.el.ValueExpression;
@@ -52,6 +54,7 @@ import org.apache.el.util.JreCompat;
 import org.apache.jasper.Constants;
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
+import org.apache.jasper.TrimSpacesOption;
 import org.apache.jasper.compiler.Node.NamedAttribute;
 import org.apache.jasper.runtime.JspRuntimeLibrary;
 import org.xml.sax.Attributes;
@@ -81,6 +84,10 @@ class Generator {
 
 private static final Class[] OBJECT_CLASS = { Object.class };
 
+private static final Pattern PRE_TAG_PATTERN = 
Pattern.compile("(?s).*(|).*");
+
+private static final Pattern BLANK_LINE_PATTERN = 
Pattern.compile("(\\s*(\\n|\\r)+\\s*)");
+
 private final ServletWriter out;
 
 private final ArrayList methodsBuffered;
@@ -2097,6 +2104,21 @@ class Generator {
 public void visit(Node.TemplateText n) throws 

buildbot failure in on tomcat-trunk

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

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch master] 3643c39fd226b4368b13e7e879f8e7868a00573d
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



[tomcat] branch 8.5.x updated: Add missing string

2021-03-16 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 99bb0a1  Add missing string
99bb0a1 is described below

commit 99bb0a1f5a462781d4e7231ba629331d9db53e26
Author: Mark Thomas 
AuthorDate: Tue Mar 16 16:10:10 2021 +

Add missing string
---
 java/org/apache/jasper/resources/LocalStrings.properties | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/org/apache/jasper/resources/LocalStrings.properties 
b/java/org/apache/jasper/resources/LocalStrings.properties
index c95dad5..26b8adf 100644
--- a/java/org/apache/jasper/resources/LocalStrings.properties
+++ b/java/org/apache/jasper/resources/LocalStrings.properties
@@ -305,6 +305,7 @@ jsp.warning.strictQuoteEscaping=Warning: Invalid value for 
the initParam strictQ
 jsp.warning.suppressSmap=Warning: Invalid value for the initParam 
suppressSmap. Will use the default value of "false"
 jsp.warning.tagPreDestroy=Error processing preDestroy on tag instance of [{0}]
 jsp.warning.tagRelease=Error processing release on tag instance of [{0}]
+jsp.warning.trimspaces=Warning: Invalid value for the initParam trimSpaces. 
Will use the default value of "false"
 jsp.warning.unknown.sourceVM=Unknown source VM [{0}] ignored
 jsp.warning.unknown.targetVM=Unknown target VM [{0}] ignored
 jsp.warning.unsupported.sourceVM=Unsupported source VM [{0}] requested, using 
[{1}]


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

2021-03-16 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 b4dda90  Add missing string
b4dda90 is described below

commit b4dda90ff1efb52b74690ac0deca3386695cac2b
Author: Mark Thomas 
AuthorDate: Tue Mar 16 16:10:10 2021 +

Add missing string
---
 java/org/apache/jasper/resources/LocalStrings.properties | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/org/apache/jasper/resources/LocalStrings.properties 
b/java/org/apache/jasper/resources/LocalStrings.properties
index e716b47..f09de0f 100644
--- a/java/org/apache/jasper/resources/LocalStrings.properties
+++ b/java/org/apache/jasper/resources/LocalStrings.properties
@@ -299,6 +299,7 @@ jsp.warning.strictQuoteEscaping=Warning: Invalid value for 
the initParam strictQ
 jsp.warning.suppressSmap=Warning: Invalid value for the initParam 
suppressSmap. Will use the default value of "false"
 jsp.warning.tagPreDestroy=Error processing preDestroy on tag instance of [{0}]
 jsp.warning.tagRelease=Error processing release on tag instance of [{0}]
+jsp.warning.trimspaces=Warning: Invalid value for the initParam trimSpaces. 
Will use the default value of "false"
 jsp.warning.unknown.sourceVM=Unknown source VM [{0}] ignored
 jsp.warning.unknown.targetVM=Unknown target VM [{0}] ignored
 jsp.warning.unsupported.sourceVM=Unsupported source VM [{0}] requested, using 
[{1}]


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



[tomcat] branch master updated: Add missing string

2021-03-16 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 3643c39  Add missing string
3643c39 is described below

commit 3643c39fd226b4368b13e7e879f8e7868a00573d
Author: Mark Thomas 
AuthorDate: Tue Mar 16 16:10:10 2021 +

Add missing string
---
 java/org/apache/jasper/resources/LocalStrings.properties | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/org/apache/jasper/resources/LocalStrings.properties 
b/java/org/apache/jasper/resources/LocalStrings.properties
index ecdc5d2..698eb82 100644
--- a/java/org/apache/jasper/resources/LocalStrings.properties
+++ b/java/org/apache/jasper/resources/LocalStrings.properties
@@ -302,6 +302,7 @@ jsp.warning.strictWhitespace=Warning: Invalid value for the 
initParam strictWhit
 jsp.warning.suppressSmap=Warning: Invalid value for the initParam 
suppressSmap. Will use the default value of "false"
 jsp.warning.tagPreDestroy=Error processing preDestroy on tag instance of [{0}]
 jsp.warning.tagRelease=Error processing release on tag instance of [{0}]
+jsp.warning.trimspaces=Warning: Invalid value for the initParam trimSpaces. 
Will use the default value of "false"
 jsp.warning.unknown.sourceVM=Unknown source VM [{0}] ignored
 jsp.warning.unknown.targetVM=Unknown target VM [{0}] ignored
 jsp.warning.unsupported.sourceVM=Unsupported source VM [{0}] requested, using 
[{1}]


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



Release Announcement: General Availability of Java 16 / JDK 16

2021-03-16 Thread Rory O'Donnell


Hi Mark,

*Release Announcement: General Availability of Java 16 / JDK 16 *

**

 * JDK 16, the reference implementation of Java 16, is now Generally
   Available. [1]
 * GPL-licensed OpenJDK builds from Oracle are available here:
   http://jdk.java.net/16/ 
 * JDK 16 Release notes
   

*JDK 16 includes the following features [2]:*

 * JEP 338:Vector API (Incubator) 
 * JEP 347:Enable C++14 Language Features
   
 * JEP 357:Migrate from Mercurial to Git
   
 * JEP 369:Migrate to GitHub 
 * JEP 376:ZGC: Concurrent Thread-Stack Processing
   
 * JEP 380:Unix-Domain Socket Channels 
 * JEP 386:Alpine Linux Port 
 * JEP 387:Elastic Metaspace 
 * JEP 388:Windows/AArch64 Port 
 * JEP 389:Foreign Linker API (Incubator)
   
 * JEP 390:Warnings for Value-Based Classes
   
 * JEP 392:Packaging Tool 
 * JEP 393:Foreign-Memory Access API (Third Incubator)
   
 * JEP 394:Pattern Matching for instanceof
   
 * JEP 395:Records 
 * JEP 396:Strongly Encapsulate JDK Internals by Default
   
 * JEP 397:Sealed Classes (Second Preview)
   

Thanks to everyone who contributed to JDK 16, whether by creating 
features or enhancements, logging bugs, or


downloading and testing the early-access builds.

*OpenJDK 17 Early Access build 13 is now available at 
http://jdk.java.net/17 

*


**

 * These early access, open source builds are provided under the GNU
   General Public License, version 2, with the Classpath Exception
   .
 * JEPs targeted to JDK 17, so far:
 o JEP 356: Enhanced Pseudo-Random Number Generators
   

 * Release Notes are available at http://jdk.java.net/17/release-notes
   

 * Significant changes since the last availability email:
 o JDK-8259709: Disable SHA-1 XML Signatures (b13)
 o JDK-6323374: (coll) Optimize Collections.unmodifiable* and
   synchronized*(b13)
 o JDK-8139348: Deprecate 3DES and RC4 in Kerberos (b12)
 o JDK-8259662: Don't wrap SocketExceptions into SSLExceptions in
   SSLSocketImpl (b11)
 o JDK-8235139: Deprecate the socket impl factory mechanism(b10)
 o JDK-8225081: Remove Telia Company CA certificate expiring in
   April 2021(b9)


*Project Lanai Early-Access Builds
*

 * EA 10 Build 17-lanai+3-133 (2021/3/2) is available -
   http://jdk.java.net/lanai/
 * These early access, open source builds are provided under the GNU
   General Public License, version 2, with the Classpath Exception
   .


*Project Loom Early-Access Builds*

 * Build 17-loom+4-174 (2021/3/12) is available - http://jdk.java.net/loom/
 * These early access, open source builds are provided under the GNU
   General Public License, version 2, with the Classpath Exception
   .


*Project Panama Early-Access Builds
*

 * Build 17-panama+2-51 (2021/2/12) is available -
   http://jdk.java.net/panama/
 * These early access, open source builds are provided under the GNU
   General Public License, version 2, with the Classpath Exception
   .


Rgds,Rory

[1] https://mail.openjdk.java.net/pipermail/jdk-dev/2021-March/005188.html

[2] https://openjdk.java.net/projects/jdk/16/ 





[tomcat] branch 8.5.x updated: Avoid NPE on some failed resolutions

2021-03-16 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 bd8ee28  Avoid NPE on some failed resolutions
bd8ee28 is described below

commit bd8ee282d509f6533a6bcd5e3beb316123c261bf
Author: remm 
AuthorDate: Tue Mar 16 15:59:23 2021 +0100

Avoid NPE on some failed resolutions

In some cases, the factory returns null, so treat it as a usual naming
failure.
---
 java/org/apache/naming/NamingContext.java | 3 +++
 webapps/docs/changelog.xml| 8 
 2 files changed, 11 insertions(+)

diff --git a/java/org/apache/naming/NamingContext.java 
b/java/org/apache/naming/NamingContext.java
index b6a97bb..37b42e3 100644
--- a/java/org/apache/naming/NamingContext.java
+++ b/java/org/apache/naming/NamingContext.java
@@ -847,6 +847,9 @@ public class NamingContext implements Context {
 entry.value = obj;
 }
 }
+if (obj == null) {
+throw new 
NamingException(sm.getString("namingContext.failResolvingReference"));
+}
 return obj;
 } catch (NamingException e) {
 throw e;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d77a083..7ce868d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,6 +104,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Avoid NPE when a JNDI reference cannot be resolved in favor of a
+NamingException. (remm)
+  
+
+  
   
 
   


-
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: Avoid NPE on some failed resolutions

2021-03-16 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 203dc0a  Avoid NPE on some failed resolutions
203dc0a is described below

commit 203dc0ab6637d4f16b0bf03ebbd871b8b164a511
Author: remm 
AuthorDate: Tue Mar 16 15:59:23 2021 +0100

Avoid NPE on some failed resolutions

In some cases, the factory returns null, so treat it as a usual naming
failure.
---
 java/org/apache/naming/NamingContext.java | 3 +++
 webapps/docs/changelog.xml| 8 
 2 files changed, 11 insertions(+)

diff --git a/java/org/apache/naming/NamingContext.java 
b/java/org/apache/naming/NamingContext.java
index e1ddeff..67d6284 100644
--- a/java/org/apache/naming/NamingContext.java
+++ b/java/org/apache/naming/NamingContext.java
@@ -873,6 +873,9 @@ public class NamingContext implements Context {
 entry.value = obj;
 }
 }
+if (obj == null) {
+throw new 
NamingException(sm.getString("namingContext.failResolvingReference"));
+}
 return obj;
 } catch (NamingException e) {
 throw e;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9ae4b82..777f9f8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,6 +104,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Avoid NPE when a JNDI reference cannot be resolved in favor of a
+NamingException. (remm)
+  
+
+  
   
 
   


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



[tomcat] branch master updated: Avoid NPE on some failed resolutions

2021-03-16 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 ec13d00  Avoid NPE on some failed resolutions
ec13d00 is described below

commit ec13d000e7a484f424be33998bd7e08288027904
Author: remm 
AuthorDate: Tue Mar 16 15:59:23 2021 +0100

Avoid NPE on some failed resolutions

In some cases, the factory returns null, so treat it as a usual naming
failure.
---
 java/org/apache/naming/NamingContext.java | 3 +++
 webapps/docs/changelog.xml| 8 
 2 files changed, 11 insertions(+)

diff --git a/java/org/apache/naming/NamingContext.java 
b/java/org/apache/naming/NamingContext.java
index e1ddeff..67d6284 100644
--- a/java/org/apache/naming/NamingContext.java
+++ b/java/org/apache/naming/NamingContext.java
@@ -873,6 +873,9 @@ public class NamingContext implements Context {
 entry.value = obj;
 }
 }
+if (obj == null) {
+throw new 
NamingException(sm.getString("namingContext.failResolvingReference"));
+}
 return obj;
 } catch (NamingException e) {
 throw e;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b1b836f..1e15ba2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,6 +104,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Avoid NPE when a JNDI reference cannot be resolved in favor of a
+NamingException. (remm)
+  
+
+  
   
 
   


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



[GitHub] [tomcat] mcroteau commented on pull request #410: Thank you! Apologies if unable to use right now...

2021-03-16 Thread GitBox


mcroteau commented on pull request #410:
URL: https://github.com/apache/tomcat/pull/410#issuecomment-800286751


   I’m sorry.
   
   On Tue, Mar 16, 2021 at 12:40 AM Mark Thomas ***@***.***>
   wrote:
   
   > Closing as per my previous suggestion.
   >
   > To repeat what I said previously:
   >
   > My suggestion would be ... look at the user visible uses of "war" - at
   > least as a starting point - as far more people will see those than the
   > internal code. While I don't think it will be possible to remove every
   > reference right away, I am sure there are places where web archive could be
   > used instead. I suggest starting small, maybe with a single documentation
   > page.
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > , or
   > unsubscribe
   > 

   > .
   >
   



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 #375: Tomcat controller

2021-03-16 Thread GitBox


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


   



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 #375: Tomcat controller

2021-03-16 Thread GitBox


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


   Closing as per my comment in the BZ issue.



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 64858] Allow to deploy a WAR whose dependencies are on a Maven repository

2021-03-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64858

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|NEW |RESOLVED

--- Comment #9 from Mark Thomas  ---
Sorry, I am closing this as WONTFIX. The changes requested are too big compared
to the benefit provided and lack of wider demand for such a feature.

I can think of several alternative ways this could be implemented without
changes to Apache Tomcat.

1. A basic approach that should work for simple cases would be to configure a
ServletContextListener that checked for any additionally required JARs and
downloaded them to WEB-INF/lib. As long as nothing needs to reference a class
in the additional JARs before they can be downloaded it should "just work".

2. The previous approach won't work if the downloaded JARs need to use the
Servlet pluggability features. In this case, it would be necessary to trigger a
web application reload after the JARs had been downloaded. Touching web.xml
should be sufficient for that.

3. A less hacky approach would be to implement your own Manager application.
Since the Manager app would be in control of the deployment process it could
deploy the WAR, add any additional JARs and then start the web application.

All of the above is untested. I am least confident of approach 2. Approach 1
should work for the simple case and approach 3 should work for any application.

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



[GitHub] [tomcat] markt-asf commented on pull request #410: Thank you! Apologies if unable to use right now...

2021-03-16 Thread GitBox


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


   Closing as per my previous suggestion.
   
   To repeat what I said previously:
   > My suggestion would be ... look at the user visible uses of "war" - at 
least as a starting point - as far more people will see those than the internal 
code. While I don't think it will be possible to remove every reference right 
away, I am sure there are places where web archive could be used instead. I 
suggest starting small, maybe with a single documentation page.



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 #410: Thank you! Apologies if unable to use right now...

2021-03-16 Thread GitBox


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


   



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 #413: Supplemental fix for https://github.com/apache/tomcat/commit/c232657

2021-03-16 Thread GitBox


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


   Thanks. I applied this manually so I could add a change log entry.



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 #413: Supplemental fix for https://github.com/apache/tomcat/commit/c232657

2021-03-16 Thread GitBox


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


   



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 9.0.x updated: Add missing OSGi export

2021-03-16 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 9ee721d  Add missing OSGi export
9ee721d is described below

commit 9ee721dd191349623d6f86942bffd11df528442a
Author: Mark Thomas 
AuthorDate: Tue Mar 16 08:34:35 2021 +

Add missing OSGi export
---
 res/bnd/tomcat-embed-jasper.jar.tmp.bnd | 1 +
 webapps/docs/changelog.xml  | 9 +
 2 files changed, 10 insertions(+)

diff --git a/res/bnd/tomcat-embed-jasper.jar.tmp.bnd 
b/res/bnd/tomcat-embed-jasper.jar.tmp.bnd
index d9cf762..1d17da1 100644
--- a/res/bnd/tomcat-embed-jasper.jar.tmp.bnd
+++ b/res/bnd/tomcat-embed-jasper.jar.tmp.bnd
@@ -23,6 +23,7 @@ Export-Package: \
 org.apache.jasper.compiler,\
 org.apache.jasper.compiler.tagplugin,\
 org.apache.jasper.el,\
+org.apache.jasper.optimizations,\
 org.apache.jasper.runtime,\
 org.apache.jasper.security,\
 org.apache.jasper.servlet,\
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7557d37..9ae4b82 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -127,6 +127,15 @@
   
 
   
+  
+
+  
+Include the new org.apache.jasper.optimizations package in
+the list of OSGi exported packages for the Jasper embedded JAR. Patch
+provided by Sokratis Zappis. (markt)
+  
+
+  
 
 
   


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



[tomcat] branch master updated: Add missing OSGi export

2021-03-16 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 cfa012c  Add missing OSGi export
cfa012c is described below

commit cfa012cd242ce885dca80e6a0b58dc25937ea672
Author: Mark Thomas 
AuthorDate: Tue Mar 16 08:34:35 2021 +

Add missing OSGi export
---
 res/bnd/tomcat-embed-jasper.jar.tmp.bnd | 1 +
 webapps/docs/changelog.xml  | 9 +
 2 files changed, 10 insertions(+)

diff --git a/res/bnd/tomcat-embed-jasper.jar.tmp.bnd 
b/res/bnd/tomcat-embed-jasper.jar.tmp.bnd
index 20ae1e4..4ae7954 100644
--- a/res/bnd/tomcat-embed-jasper.jar.tmp.bnd
+++ b/res/bnd/tomcat-embed-jasper.jar.tmp.bnd
@@ -23,6 +23,7 @@ Export-Package: \
 org.apache.jasper.compiler,\
 org.apache.jasper.compiler.tagplugin,\
 org.apache.jasper.el,\
+org.apache.jasper.optimizations,\
 org.apache.jasper.runtime,\
 org.apache.jasper.security,\
 org.apache.jasper.servlet,\
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 05aff5e..b1b836f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -127,6 +127,15 @@
   
 
   
+  
+
+  
+Include the new org.apache.jasper.optimizations package in
+the list of OSGi exported packages for the Jasper embedded JAR. Patch
+provided by Sokratis Zappis. (markt)
+  
+
+  
 
 
   


-
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: Fix typo. Thanks to Rob Sargent.

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

markt 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 c13bb79  Fix typo. Thanks to Rob Sargent.
c13bb79 is described below

commit c13bb793246793f5a779afeffdbc9c50559fe223
Author: Mark Thomas 
AuthorDate: Tue Mar 16 08:14:42 2021 +

Fix typo. Thanks to Rob Sargent.
---
 webapps/docs/logging.xml | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/webapps/docs/logging.xml b/webapps/docs/logging.xml
index cf3396b..3ba9691 100644
--- a/webapps/docs/logging.xml
+++ b/webapps/docs/logging.xml
@@ -77,12 +77,12 @@
 
 
 
-  The logging frameworks used by different web applications run 
independently
-  of each other. See class loading
-  for more details.
-  The exception to this rule is java.util.logging, if it used
-  directly or indirectly by your logging library. That is because it is 
loaded
-  by the system and is shared across web applications.
+  The logging frameworks used by different web applications are 
independent.
+  See class loading for more details.
+  The exception to this rule is java.util.logging. If it is
+  used directly or indirectly by your logging library then elements of it
+  will be shared across web applications because it is loaded by the system
+  class loader.
 
 
 


-
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 typo. Thanks to Rob Sargent.

2021-03-16 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 5e70d41  Fix typo. Thanks to Rob Sargent.
5e70d41 is described below

commit 5e70d41108977938ae58eceef84899322a21d9ef
Author: Mark Thomas 
AuthorDate: Tue Mar 16 08:14:42 2021 +

Fix typo. Thanks to Rob Sargent.
---
 webapps/docs/logging.xml | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/webapps/docs/logging.xml b/webapps/docs/logging.xml
index 33ea117..a454aa2 100644
--- a/webapps/docs/logging.xml
+++ b/webapps/docs/logging.xml
@@ -73,10 +73,10 @@
 
   The logging frameworks used by different web applications are 
independent.
   See class loading for more details.
-  The exception to this rule is java.util.logging. If it used
-  directly or indirectly by your logging library then elements of it will 
be
-  shared across web applications because it is loaded by the system class
-  loader.
+  The exception to this rule is java.util.logging. If it is
+  used directly or indirectly by your logging library then elements of it
+  will be shared across web applications because it is loaded by the system
+  class loader.
 
 
 


-
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: Fix typo. Thanks to Rob Sargent.

2021-03-16 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 9cb5915  Fix typo. Thanks to Rob Sargent.
9cb5915 is described below

commit 9cb5915831641d5d7edab2a7cc32120a6190c7c8
Author: Mark Thomas 
AuthorDate: Tue Mar 16 08:14:42 2021 +

Fix typo. Thanks to Rob Sargent.
---
 webapps/docs/logging.xml | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/webapps/docs/logging.xml b/webapps/docs/logging.xml
index b60744e..14fa5d0 100644
--- a/webapps/docs/logging.xml
+++ b/webapps/docs/logging.xml
@@ -73,10 +73,10 @@
 
   The logging frameworks used by different web applications are 
independent.
   See class loading for more details.
-  The exception to this rule is java.util.logging. If it used
-  directly or indirectly by your logging library then elements of it will 
be
-  shared across web applications because it is loaded by the system class
-  loader.
+  The exception to this rule is java.util.logging. If it is
+  used directly or indirectly by your logging library then elements of it
+  will be shared across web applications because it is loaded by the system
+  class loader.
 
 
 


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



[tomcat] branch master updated: Fix typo. Thanks to Rob Sargent.

2021-03-16 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 dda82a1  Fix typo. Thanks to Rob Sargent.
dda82a1 is described below

commit dda82a1a09c9baed391343ba745a521287843499
Author: Mark Thomas 
AuthorDate: Tue Mar 16 08:14:42 2021 +

Fix typo. Thanks to Rob Sargent.
---
 webapps/docs/logging.xml | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/webapps/docs/logging.xml b/webapps/docs/logging.xml
index 489cc1a..c8423cb 100644
--- a/webapps/docs/logging.xml
+++ b/webapps/docs/logging.xml
@@ -73,10 +73,10 @@
 
   The logging frameworks used by different web applications are 
independent.
   See class loading for more details.
-  The exception to this rule is java.util.logging. If it used
-  directly or indirectly by your logging library then elements of it will 
be
-  shared across web applications because it is loaded by the system class
-  loader.
+  The exception to this rule is java.util.logging. If it is
+  used directly or indirectly by your logging library then elements of it
+  will be shared across web applications because it is loaded by the system
+  class loader.
 
 
 


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