[Bug 56268] New: Minor correction to deployer-howto.html

2014-03-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56268

Bug ID: 56268
   Summary: Minor correction to deployer-howto.html
   Product: Tomcat 7
   Version: unspecified
  Hardware: All
OS: All
Status: NEW
  Severity: trivial
  Priority: P2
 Component: Documentation
  Assignee: dev@tomcat.apache.org
  Reporter: s...@apache.org

http://tomcat.apache.org/tomcat-7.0-doc/deployer-howto.html says:

build: The build folder used will be, by default, ${build}/webapp/${path}.
After the end of the execution of the compile target, the web application .WAR
will be located at ${build}/webapp/${path}.war.

The page ought to document the default value of build, which is
${basedir}/build.

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



svn commit: r1577831 - in /tomcat/trunk: java/org/apache/tomcat/util/net/ test/org/apache/tomcat/websocket/ webapps/docs/config/

2014-03-15 Thread remm
Author: remm
Date: Sat Mar 15 11:19:50 2014
New Revision: 1577831

URL: http://svn.apache.org/r1577831
Log:
- Cleanup and prefer non direct buffers for SSL by default (32KB of direct 
buffers per connection looks a bit too much).
- Give up on the SSL test for now.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java

tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
tomcat/trunk/webapps/docs/config/ajp.xml
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1577831r1=1577830r2=1577831view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Sat Mar 15 
11:19:50 2014
@@ -270,8 +270,8 @@ public class Nio2Endpoint extends Abstra
  * Number of keepalive sockets.
  */
 public int getKeepAliveCount() {
-return 0;
-// FIXME: would need some specific statistics gathering
+// For this connector, only the overall connection count is relevant
+return -1;
 }
 
 
@@ -464,9 +464,9 @@ public class Nio2Endpoint extends Abstra
 // SSL setup
 if (sslContext != null) {
 SSLEngine engine = createSSLEngine();
-int appbufsize = 
engine.getSession().getApplicationBufferSize();
-NioBufferHandler bufhandler = new 
NioBufferHandler(Math.max(appbufsize,socketProperties.getAppReadBufSize()),
-socketProperties.getAppWriteBufSize(),
+int appBufferSize = 
engine.getSession().getApplicationBufferSize();
+NioBufferHandler bufhandler = new 
NioBufferHandler(Math.max(appBufferSize, socketProperties.getAppReadBufSize()),
+Math.max(appBufferSize, 
socketProperties.getAppWriteBufSize()),
 socketProperties.getDirectBuffer());
 channel = new SecureNio2Channel(socket, engine, 
bufhandler, this);
 } else {
@@ -493,9 +493,13 @@ public class Nio2Endpoint extends Abstra
 
socketWrapper.setKeepAliveLeft(Nio2Endpoint.this.getMaxKeepAliveRequests());
 socketWrapper.setSecure(isSSLEnabled());
 channel.setSocket(socketWrapper);
-processSocket(socketWrapper, SocketStatus.OPEN_READ, true);
-// FIXME: In theory, awaitBytes is better, but the SSL handshake 
is done by processSocket
-//awaitBytes(socketWrapper);
+if (sslContext != null) {
+// Use the regular processing, as the first handshake needs to 
be done there
+processSocket(socketWrapper, SocketStatus.OPEN_READ, true);
+} else {
+// Wait until some bytes are available to start the real 
processing
+awaitBytes(socketWrapper);
+}
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
 try {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java?rev=1577831r1=1577830r2=1577831view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java Sat Mar 
15 11:19:50 2014
@@ -59,19 +59,21 @@ public class SecureNio2Channel extends N
 public SecureNio2Channel(AsynchronousSocketChannel channel, SSLEngine 
engine,
 ApplicationBufferHandler bufHandler, Nio2Endpoint endpoint0) 
throws IOException {
 super(channel, bufHandler);
-this.sslEngine = engine;
-this.endpoint = endpoint0;
-int appBufSize = sslEngine.getSession().getApplicationBufferSize();
+sslEngine = engine;
+endpoint = endpoint0;
 int netBufSize = sslEngine.getSession().getPacketBufferSize();
-//allocate network buffers - TODO, add in optional direct non-direct 
buffers
-netInBuffer = ByteBuffer.allocateDirect(netBufSize);
-netOutBuffer = ByteBuffer.allocateDirect(netBufSize);
-
+if (endpoint.getSocketProperties().getDirectSslBuffer()) {
+netInBuffer = ByteBuffer.allocateDirect(netBufSize);
+netOutBuffer = ByteBuffer.allocateDirect(netBufSize);
+} else {
+netInBuffer = ByteBuffer.allocate(netBufSize);
+netOutBuffer = ByteBuffer.allocate(netBufSize);
+

buildbot success in ASF Buildbot on tomcat-trunk

2014-03-15 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/5600

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1577831
Blamelist: remm

Build succeeded!

sincerely,
 -The Buildbot





svn commit: r1577867 - /tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 14:30:09 2014
New Revision: 1577867

URL: http://svn.apache.org/r1577867
Log:
Better reporting for skipped tests.
With org.junit.Assume the tests are clearly reported as 'skipped' in JUnit test 
run summary.

Modified:

tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java?rev=1577867r1=1577866r2=1577867view=diff
==
--- 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java 
(original)
+++ 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java 
Sat Mar 15 14:30:09 2014
@@ -28,6 +28,7 @@ import javax.websocket.Session;
 import javax.websocket.WebSocketContainer;
 
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
@@ -49,10 +50,10 @@ public class TestWebSocketFrameClientSSL
 //   do the encryption inline apparently messes up
 //   the websockets writes, which deadlock until timedout.
 //   Reenable later when investigated and fixed.
-if (getTomcatInstance().getConnector().getProtocol().equals(
-org.apache.coyote.http11.Http11Nio2Protocol)) {
-return;
-}
+Assume.assumeFalse(
+Skip this test on NIO2. FIXME: investigate.,
+getTomcatInstance().getConnector().getProtocol()
+
.equals(org.apache.coyote.http11.Http11Nio2Protocol));
 
 Tomcat tomcat = getTomcatInstance();
 // Must have a real docBase - just use temp
@@ -105,10 +106,10 @@ public class TestWebSocketFrameClientSSL
 public void testBug56032() throws Exception {
 // TODO Investigate options to get this test to pass with the HTTP BIO
 //  connector.
-if (getTomcatInstance().getConnector().getProtocol().equals(
-org.apache.coyote.http11.Http11Protocol)) {
-return;
-}
+Assume.assumeFalse(
+Skip this test on BIO. TODO: investigate options to make it 
pass with HTTP BIO connector,
+getTomcatInstance().getConnector().getProtocol()
+.equals(org.apache.coyote.http11.Http11Protocol));
 
 Tomcat tomcat = getTomcatInstance();
 // Must have a real docBase - just use temp



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



svn commit: r1577873 - /tomcat/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 15:02:51 2014
New Revision: 1577873

URL: http://svn.apache.org/r1577873
Log:
Followup to r1576628: correct typo in a message

Modified:
tomcat/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java?rev=1577873r1=1577872r2=1577873view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java Sat 
Mar 15 15:02:51 2014
@@ -108,7 +108,7 @@ public class TesterFirehoseServer {
 }
 }
 
-System.out.println(Recieved  + msg + , now sending data);
+System.out.println(Received  + msg + , now sending data);
 
 session.getUserProperties().put(
 org.apache.tomcat.websocket.BLOCKING_SEND_TIMEOUT,



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



svn commit: r1577875 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java test/org/apache/tomcat/websocket/TesterFirehoseServer.java

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 15:05:18 2014
New Revision: 1577875

URL: http://svn.apache.org/r1577875
Log:
Merged revisions r1576628 r1577873 from tomcat/trunk:
Add some progress info to the websockets frame test.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1576628,1577873

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1577875r1=1577874r2=1577875view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
 Sat Mar 15 15:05:18 2014
@@ -82,6 +82,8 @@ public class TestWebSocketFrameClient ex
 wsSession.addMessageHandler(handler);
 wsSession.getBasicRemote().sendText(Hello);
 
+System.out.println(Sent Hello message, waiting for data);
+
 // Ignore the latch result as the message count test below will tell us
 // if the right number of messages arrived
 handler.getLatch().await(TesterFirehoseServer.WAIT_TIME_MILLIS,

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java?rev=1577875r1=1577874r2=1577875view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java 
Sat Mar 15 15:05:18 2014
@@ -109,6 +109,8 @@ public class TesterFirehoseServer {
 }
 }
 
+System.out.println(Received  + msg + , now sending data);
+
 session.getUserProperties().put(
 org.apache.tomcat.websocket.BLOCKING_SEND_TIMEOUT,
 Long.valueOf(SEND_TIME_OUT_MILLIS));



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



svn commit: r1577876 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java test/org/apache/tomcat/websocket/TesterFirehoseServer.java

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 15:11:15 2014
New Revision: 1577876

URL: http://svn.apache.org/r1577876
Log:
Merged revisions r1576810 r1576722 from tomcat/trunk:
TestWebSocketFrameClient: Add non SSL version of the frame test.
TesterFirehoseServer: Fix an Eclipse nag now the received message is used.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1576722,1576810

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1577876r1=1577875r2=1577876view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
 Sat Mar 15 15:11:15 2014
@@ -45,6 +45,51 @@ import org.apache.tomcat.websocket.Teste
 public class TestWebSocketFrameClient extends TomcatBaseTest {
 
 @Test
+public void testConnectToServerEndpoint() throws Exception {
+
+Tomcat tomcat = getTomcatInstance();
+// Must have a real docBase - just use temp
+Context ctx =
+tomcat.addContext(, System.getProperty(java.io.tmpdir));
+ctx.addApplicationListener(new ApplicationListener(
+TesterFirehoseServer.Config.class.getName(), false));
+Tomcat.addServlet(ctx, default, new DefaultServlet());
+ctx.addServletMapping(/, default);
+
+tomcat.start();
+
+WebSocketContainer wsContainer =
+ContainerProvider.getWebSocketContainer();
+ClientEndpointConfig clientEndpointConfig =
+ClientEndpointConfig.Builder.create().build();
+Session wsSession = wsContainer.connectToServer(
+TesterProgrammaticEndpoint.class,
+clientEndpointConfig,
+new URI(ws://localhost: + getPort() +
+TesterFirehoseServer.Config.PATH));
+CountDownLatch latch =
+new CountDownLatch(TesterFirehoseServer.MESSAGE_COUNT);
+BasicText handler = new BasicText(latch);
+wsSession.addMessageHandler(handler);
+wsSession.getBasicRemote().sendText(Hello);
+
+System.out.println(Sent Hello message, waiting for data);
+
+// Ignore the latch result as the message count test below will tell us
+// if the right number of messages arrived
+handler.getLatch().await(TesterFirehoseServer.WAIT_TIME_MILLIS,
+TimeUnit.MILLISECONDS);
+
+QueueString messages = handler.getMessages();
+Assert.assertEquals(
+TesterFirehoseServer.MESSAGE_COUNT, messages.size());
+for (String message : messages) {
+Assert.assertEquals(TesterFirehoseServer.MESSAGE, message);
+}
+}
+
+
+@Test
 public void testConnectToServerEndpointSSL() throws Exception {
 
 Tomcat tomcat = getTomcatInstance();

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java?rev=1577876r1=1577875r2=1577876view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java 
Sat Mar 15 15:11:15 2014
@@ -95,8 +95,7 @@ public class TesterFirehoseServer {
 }
 
 @OnMessage
-public void onMessage(Session session,
-@SuppressWarnings(unused) String msg) throws IOException {
+public void onMessage(Session session, String msg) throws IOException {
 
 if (started) {
 return;



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



svn commit: r1577877 - in /tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket: TestWebSocketFrameClient.java TestWebSocketFrameClientSSL.java

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 15:18:42 2014
New Revision: 1577877

URL: http://svn.apache.org/r1577877
Log:
Backport of r1577073 from tomcat/trunk:
Split the test SSL/non-SSL.

Added:

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
  - copied, changed from r1577876, 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
Modified:

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1577877r1=1577876r2=1577877view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
 Sat Mar 15 15:18:42 2014
@@ -16,16 +16,13 @@
  */
 package org.apache.tomcat.websocket;
 
-import java.io.File;
 import java.net.URI;
-import java.net.URL;
 import java.util.Queue;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
 import javax.websocket.ClientEndpointConfig;
 import javax.websocket.ContainerProvider;
-import javax.websocket.MessageHandler;
 import javax.websocket.Session;
 import javax.websocket.WebSocketContainer;
 
@@ -37,9 +34,7 @@ import org.apache.catalina.deploy.Applic
 import org.apache.catalina.servlets.DefaultServlet;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
-import org.apache.tomcat.util.net.TesterSupport;
 import org.apache.tomcat.websocket.TesterMessageCountClient.BasicText;
-import org.apache.tomcat.websocket.TesterMessageCountClient.SleepingText;
 import 
org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint;
 
 public class TestWebSocketFrameClient extends TomcatBaseTest {
@@ -87,127 +82,4 @@ public class TestWebSocketFrameClient ex
 Assert.assertEquals(TesterFirehoseServer.MESSAGE, message);
 }
 }
-
-
-@Test
-public void testConnectToServerEndpointSSL() throws Exception {
-
-Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext(, System.getProperty(java.io.tmpdir));
-ctx.addApplicationListener(new ApplicationListener(
-TesterFirehoseServer.Config.class.getName(), false));
-Tomcat.addServlet(ctx, default, new DefaultServlet());
-ctx.addServletMapping(/, default);
-
-
-TesterSupport.initSsl(tomcat);
-
-tomcat.start();
-
-WebSocketContainer wsContainer =
-ContainerProvider.getWebSocketContainer();
-ClientEndpointConfig clientEndpointConfig =
-ClientEndpointConfig.Builder.create().build();
-URL truststoreUrl = this.getClass().getClassLoader().getResource(
-org/apache/tomcat/util/net/ca.jks);
-File truststoreFile = new File(truststoreUrl.toURI());
-clientEndpointConfig.getUserProperties().put(
-WsWebSocketContainer.SSL_TRUSTSTORE_PROPERTY,
-truststoreFile.getAbsolutePath());
-Session wsSession = wsContainer.connectToServer(
-TesterProgrammaticEndpoint.class,
-clientEndpointConfig,
-new URI(wss://localhost: + getPort() +
-TesterFirehoseServer.Config.PATH));
-CountDownLatch latch =
-new CountDownLatch(TesterFirehoseServer.MESSAGE_COUNT);
-BasicText handler = new BasicText(latch);
-wsSession.addMessageHandler(handler);
-wsSession.getBasicRemote().sendText(Hello);
-
-System.out.println(Sent Hello message, waiting for data);
-
-// Ignore the latch result as the message count test below will tell us
-// if the right number of messages arrived
-handler.getLatch().await(TesterFirehoseServer.WAIT_TIME_MILLIS,
-TimeUnit.MILLISECONDS);
-
-QueueString messages = handler.getMessages();
-Assert.assertEquals(
-TesterFirehoseServer.MESSAGE_COUNT, messages.size());
-for (String message : messages) {
-Assert.assertEquals(TesterFirehoseServer.MESSAGE, message);
-}
-}
-
-
-@Test
-public void testBug56032() throws Exception {
-// TODO Investigate options to get this test to pass with the HTTP BIO
-//  connector.
-if 
(getTomcatInstance().getConnector().getProtocol().equals(HTTP/1.1)) {
-return;
-}
-
-Tomcat tomcat = getTomcatInstance();
-// Must have a real docBase - just use temp
-Context ctx =
-tomcat.addContext(, System.getProperty(java.io.tmpdir));

svn commit: r1577879 - /tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 15:22:58 2014
New Revision: 1577879

URL: http://svn.apache.org/r1577879
Log:
Backport of r1577867 from tomcat/trunk:
Better reporting for skipped tests.
With org.junit.Assume the tests are clearly reported as 'skipped' in JUnit test 
run summary.

Modified:

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java?rev=1577879r1=1577878r2=1577879view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
 Sat Mar 15 15:22:58 2014
@@ -30,6 +30,7 @@ import javax.websocket.Session;
 import javax.websocket.WebSocketContainer;
 
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
@@ -103,9 +104,9 @@ public class TestWebSocketFrameClientSSL
 public void testBug56032() throws Exception {
 // TODO Investigate options to get this test to pass with the HTTP BIO
 //  connector.
-if 
(getTomcatInstance().getConnector().getProtocol().equals(HTTP/1.1)) {
-return;
-}
+Assume.assumeFalse(
+Skip this test on BIO. TODO: investigate options to make it 
pass with HTTP BIO connector,
+
getTomcatInstance().getConnector().getProtocol().equals(HTTP/1.1));
 
 Tomcat tomcat = getTomcatInstance();
 // Must have a real docBase - just use temp



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



svn commit: r1577884 - /tomcat/trunk/webapps/docs/config/http.xml

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 15:36:13 2014
New Revision: 1577884

URL: http://svn.apache.org/r1577884
Log:
Followup to r1577831
Clarify the new socket.directSslBuffer option.

Modified:
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/http.xml?rev=1577884r1=1577883r2=1577884view=diff
==
--- tomcat/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/trunk/webapps/docs/config/http.xml Sat Mar 15 15:36:13 2014
@@ -815,9 +815,13 @@
 
   attribute name=socket.directSslBuffer required=false
 p(bool)Boolean value, whether to use direct ByteBuffers or java 
mapped
-ByteBuffers for the SSL buffers. Default is codefalse/code.br/
+ByteBuffers for the SSL buffers. If codetrue/code then
+codejava.nio.ByteBuffer.allocateDirect()/code is used to allocate
+the buffers, if codefalse/code then
+codejava.nio.ByteBuffer.allocate()/code is used. The default value
+is codefalse/code.br/
 When you are using direct buffers, make sure you allocate the
-appropriate amount of memory for the direct memory space. On Sun's JDK
+appropriate amount of memory for the direct memory space. On Oracle's 
JDK
 that would be something like code-XX:MaxDirectMemorySize=256m/code.
 /p
   /attribute



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



svn commit: r1577899 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/jasper/compiler/TestELParser.java

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 16:51:55 2014
New Revision: 1577899

URL: http://svn.apache.org/r1577899
Log:
Merged r1577544 from tomcat/trunk:
Add a couple more tests based on a report on the users list
(There tests pass, the problem looks to be elsewhere)

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELParser.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1577544

Modified: tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELParser.java?rev=1577899r1=1577898r2=1577899view=diff
==
--- tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELParser.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELParser.java Sat 
Mar 15 16:51:55 2014
@@ -152,6 +152,24 @@ public class TestELParser {
 }
 
 
+@Test
+public void testQuotes01() throws JasperException {
+doTestParser(');
+}
+
+
+@Test
+public void testQuotes02() throws JasperException {
+doTestParser('${foo}');
+}
+
+
+@Test
+public void testQuotes03() throws JasperException {
+doTestParser('${'foo'}');
+}
+
+
 private void doTestParser(String input) throws JasperException {
 Nodes nodes = ELParser.parse(input, false);
 



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



svn commit: r1577902 - /tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 17:00:31 2014
New Revision: 1577902

URL: http://svn.apache.org/r1577902
Log:
Clean an IDE warning about unthrown exception.
Since r1577757 the setSSLEngine() method is a pure setter, it no longer calls 
reset() and no longer throws an IOException.

(An alternative way to silence such warnings is to document the exception in 
Javadoc for the method).

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java?rev=1577902r1=1577901r2=1577902view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java Sat Mar 
15 17:00:31 2014
@@ -100,7 +100,7 @@ public class SecureNio2Channel extends N
 reset();
 }
 
-public void setSSLEngine(SSLEngine engine) throws IOException {
+public void setSSLEngine(SSLEngine engine) {
 this.sslEngine = engine;
 }
 



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



buildbot failure in ASF Buildbot on tomcat-7-trunk

2014-03-15 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/1808

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1577899
Blamelist: kkolinko

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





svn commit: r1577926 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/manager/ManagerServlet.java

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 19:54:56 2014
New Revision: 1577926

URL: http://svn.apache.org/r1577926
Log:
r1576908: Correct comment

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1576908

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java?rev=1577926r1=1577925r2=1577926view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java 
Sat Mar 15 19:54:56 2014
@@ -360,7 +360,7 @@ public class ManagerServlet extends Http
 response.setContentType(text/plain; charset= + Constants.CHARSET);
 PrintWriter writer = response.getWriter();
 
-// Process the requested command (note - /deploy is not listed here)
+// Process the requested command
 if (command == null) {
 writer.println(smClient.getString(managerServlet.noCommand));
 } else if (command.equals(/deploy)) {



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



svn commit: r1577929 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/manager/ManagerServlet.java

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 20:00:57 2014
New Revision: 1577929

URL: http://svn.apache.org/r1577929
Log:
r1576923 : Better Javadoc

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1576923

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java?rev=1577929r1=1577928r2=1577929view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java 
Sat Mar 15 20:00:57 2014
@@ -620,10 +620,13 @@ public class ManagerServlet extends Http
  * Deploy a web application archive (included in the current request)
  * at the specified context path.
  *
- * @param writer Writer to render results to
- * @param cn Name of the application to be installed
- * @param tag Tag to be associated with the webapp
- * @param request Servlet request we are processing
+ * @param writer   Writer to render results to
+ * @param cn   Name of the application to be installed
+ * @param tag  Tag to be associated with the webapp
+ * @param update   Flag that indicates that any existing app should be
+ *   replaced
+ * @param request  Servlet request we are processing
+ * @param smClient i18n messages using the locale of the client
  */
 protected synchronized void deploy
 (PrintWriter writer, ContextName cn,
@@ -716,9 +719,10 @@ public class ManagerServlet extends Http
  * Install an application for the specified path from the specified
  * web application archive.
  *
- * @param writer Writer to render results to
- * @param tag Revision tag to deploy from
- * @param cn Name of the application to be installed
+ * @param writerWriter to render results to
+ * @param tag   Revision tag to deploy from
+ * @param cnName of the application to be installed
+ * @param smClient  i18n messages using the locale of the client
  */
 protected void deploy(PrintWriter writer, ContextName cn, String tag,
 StringManager smClient) {
@@ -780,14 +784,15 @@ public class ManagerServlet extends Http
  * Install an application for the specified path from the specified
  * web application archive.
  *
- * @param writer Writer to render results to
- * @param config URL of the context configuration file to be installed
- * @param cn Name of the application to be installed
- * @param war URL of the web application archive to be installed
- * @param update true to override any existing webapp on the path
+ * @param writerWriter to render results to
+ * @param configURL of the context configuration file to be installed
+ * @param cnName of the application to be installed
+ * @param war   URL of the web application archive to be installed
+ * @param updatetrue to override any existing webapp on the path
+ * @param smClient  i18n messages using the locale of the client
  */
 protected void deploy(PrintWriter writer, String config, ContextName cn,
-String war, boolean update,  StringManager smClient) {
+String war, boolean update, StringManager smClient) {
 
 if (config != null  config.length() == 0) {
 config = null;



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



Re: svn commit: r1577199 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/manager/LocalStrings.properties java/org/apache/catalina/manager/ManagerServlet.java java/org/apache/catalina/startup/H

2014-03-15 Thread Konstantin Kolinko
2014-03-13 19:30 GMT+04:00  ma...@apache.org:
 Author: markt
 Date: Thu Mar 13 15:30:35 2014
 New Revision: 1577199

 URL: http://svn.apache.org/r1577199
 Log:
 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56248
 Allow the deployer to update an existing WAR file without
 undeploying the existing application if the update flag is set.
 This allows any existing custom context.xml for the application
 to be retained. To update an application and remove any existing
 context.xml simply undeploy the old version of the application
 before deploying the new version.

 Modified:
 tomcat/tc7.0.x/trunk/   (props changed)
 
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/LocalStrings.properties
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
 tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

 Propchange: tomcat/tc7.0.x/trunk/
 --
   Merged /tomcat/trunk:r1577182,1577195


There is a bug in this commit in the second deploy() method,

protected void deploy(PrintWriter writer, ContextName cn, String tag,
StringManager smClient) {
.. lines 740

// Find the local WAR file
File localWar = new File(versioned, baseName + .war);

The filename of a tagged war file should be  versioned + tag +
baseName.war.  The tag part was lost.

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



Re: svn commit: r1577199 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/manager/LocalStrings.properties java/org/apache/catalina/manager/ManagerServlet.java java/org/apache/catalina/startup/H

2014-03-15 Thread Konstantin Kolinko
2014-03-16 0:14 GMT+04:00 Konstantin Kolinko knst.koli...@gmail.com:
 2014-03-13 19:30 GMT+04:00  ma...@apache.org:
 Author: markt
 Date: Thu Mar 13 15:30:35 2014
 New Revision: 1577199

 URL: http://svn.apache.org/r1577199
 Log:
 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56248
 Allow the deployer to update an existing WAR file without
 undeploying the existing application if the update flag is set.
 This allows any existing custom context.xml for the application
 to be retained. To update an application and remove any existing
 context.xml simply undeploy the old version of the application
 before deploying the new version.

 Modified:
 tomcat/tc7.0.x/trunk/   (props changed)
 
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/LocalStrings.properties
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/ManagerServlet.java
 tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
 tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

 Propchange: tomcat/tc7.0.x/trunk/
 --
   Merged /tomcat/trunk:r1577182,1577195


 There is a bug in this commit in the second deploy() method,

 protected void deploy(PrintWriter writer, ContextName cn, String tag,
 StringManager smClient) {
 .. lines 740

 // Find the local WAR file
 File localWar = new File(versioned, baseName + .war);

 The filename of a tagged war file should be  versioned + tag +
 baseName.war.  The tag part was lost.

2. ..line 744

File deployedWar = new File(host.getAppBase(), baseName + .war);

The value of host.getAppBase() is not guaranteed to be an absolute path.

In TC7 here there is field  ManagerServlet.deployed that provides
absolute value of that path.
There is also method ManagerServlet.getAppBase() that provides
canonical path for it.

The TC8 code is correct here. It calls a different method on a Host.
 new File(host.getAppBaseFile(), baseName + .war);


The first and third deploy() methods are OK, no issues noted there.

Best regards,
Konstantin Kolinko

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



buildbot success in ASF Buildbot on tomcat-7-trunk

2014-03-15 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-7-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-7-trunk/builds/1809

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1577926
Blamelist: kkolinko

Build succeeded!

sincerely,
 -The Buildbot





[Bug 56273] New: Manager webapp: when command is skipped because web application is being serviced, say about it

2014-03-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56273

Bug ID: 56273
   Summary: Manager webapp: when command is skipped because web
application is being serviced, say about it
   Product: Tomcat 7
   Version: 7.0.52
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Manager
  Assignee: dev@tomcat.apache.org
  Reporter: knst.koli...@gmail.com

Looking at deploy/undeploy/upload methods in ManagerServlet, HtmlManagerServlet

The methods call if (!isServiced(name))  and if the web application is being
serviced (e.g. by another command running in parallel) the methods skip their
work and report success.

Instead of that they should report that they skipped their work.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 56248] Automatic deployment with TCD deletes customized context.xml file

2014-03-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56248

Konstantin Kolinko knst.koli...@gmail.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #3 from Konstantin Kolinko knst.koli...@gmail.com ---
Reviewing r1577199

Besides two small issues that I mentioned in Re: r1577199 thread on dev@, and
bug 56273, one more high-level one:

The logic in update=true case in
protected synchronized void deploy
(PrintWriter writer, ContextName cn,
 String tag, boolean update, HttpServletRequest request,
 StringManager smClient) {

is as follows:
1. mark webapp as serviced
2. delete old war
3. upload new war,
 that means to read the body of a PUT request and save it as file
4. trigger deployment, remove serviced mark

If step 3. fails due to aborted I/O, the old application will become
undeployed, deleting its custom configuration if there is any.

It would be better to upload it to a temporary name and rename the file.
A temporary name can be created with java.io.File.createTempFile(,,dir).

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



svn commit: r1577944 - /tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java

2014-03-15 Thread kkolinko
Author: kkolinko
Date: Sat Mar 15 22:55:11 2014
New Revision: 1577944

URL: http://svn.apache.org/r1577944
Log:
Better reporting for skipped tests.
With org.junit.Assume the tests are clearly reported as 'skipped' in JUnit test 
run summary.

Modified:
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java?rev=1577944r1=1577943r2=1577944view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java 
Sat Mar 15 22:55:11 2014
@@ -42,6 +42,7 @@ import javax.websocket.server.ServerEndp
 import javax.websocket.server.ServerEndpointConfig;
 
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
@@ -388,6 +389,11 @@ public class TestWsWebSocketContainer ex
 private void doTestWriteTimeoutServer(boolean setTimeoutOnContainer)
 throws Exception {
 
+// This will never work for BIO
+Assume.assumeFalse(
+Skipping test. This feature will never work for BIO 
connector.,
+getProtocol().equals(Http11Protocol.class.getName()));
+
 /*
  * Note: There are all sorts of horrible uses of statics in this test
  *   because the API uses classes and the tests really need access
@@ -397,11 +403,6 @@ public class TestWsWebSocketContainer ex
 
 Tomcat tomcat = getTomcatInstance();
 
-if (getProtocol().equals(Http11Protocol.class.getName())) {
-// This will never work for BIO
-return;
-}
-
 // Must have a real docBase - just use temp
 Context ctx =
 tomcat.addContext(, System.getProperty(java.io.tmpdir));



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



buildbot success in ASF Buildbot on tomcat-trunk

2014-03-15 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/5604

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1577944
Blamelist: kkolinko

Build succeeded!

sincerely,
 -The Buildbot