Tomcat 6 NIO connector & startup [message #195449] |
Tue, 03 July 2007 03:08 |
Dave Thomas Messages: 3 Registered: July 2009 |
Junior Member |
|
|
Hi,
There is an issue with Tomcat 6 and NIO Connectors. In the server.xml to
use Tomcat NIO, the protocol attribute must change from:
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
redirectPort="8443"/>
to:
protocol="org.apache.coyote.http11.Http11NioProtocol"
The only glitch is that in the Servers view, the state remains as
"starting" with the task running in the Progress view indefinitely, or
until you shut down the server.
This is merely an annoyance until you want to Profile On Server. Then the
profiler will forever wait until it's started.
Rather than just complain, I looked through the plugins and fixed it.
Ahh, the joys of OSS. Since I'm not an eclipse maintainer and this is my
first post, maybe someone could send it to the right place.
--- org/eclipse/jst/server/tomcat/core/internal/Tomcat60Configur ation.java
+++ org/eclipse/jst/server/tomcat/core/internal/Tomcat60Configur ation.java
@@ -76,7 +76,7 @@
while (iterator.hasNext()) {
ServerPort port = (ServerPort) iterator.next();
// Return only an HTTP port from the selected
Service
- if (port.getName().equals("HTTP/1.1") &&
port.getId().indexOf('/') < 0)
+ if ((port.getName().equals("HTTP/1.1") ||
port.getName().startsWith("org.apache.coyote.http11.Http11") )&&
port.getId().indexOf('/') < 0)
return port;
}
return null;
@@ -129,9 +129,9 @@
if (protocol != null &&
protocol.length() > 0) {
name = protocol;
protocol2 = protocol;
- if
("HTTP/1.1".equals(protocol) ||
protocol.startsWith("org.apache.coyote.http11.Http11"))
- contentTypes = new
String[] { "web", "webservices" };
}
+ if ("HTTP/1.1".equals(protocol) ||
protocol.startsWith("org.apache.coyote.http11.Http11"))
+ contentTypes = new
String[] { "web", "webservices" };
String secure =
connector.getSecure();
if (secure != null &&
secure.length() > 0) {
name = "SSL";
|
|
|
Re: Tomcat 6 NIO connector & startup [message #195557 is a reply to message #195449] |
Tue, 03 July 2007 13:17 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
The best thing to do is open a Bugzilla [1] report and attach the patch.
For bugs in the Tomcat support, specify "jst.server" as the component.
Thanks.
Cheers,
Larry
[1] https://bugs.eclipse.org/bugs/
Dave Thomas wrote:
> Hi,
>
> There is an issue with Tomcat 6 and NIO Connectors. In the server.xml
> to use Tomcat NIO, the protocol attribute must change from:
>
> <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
> redirectPort="8443"/>
>
> to:
>
> protocol="org.apache.coyote.http11.Http11NioProtocol"
> The only glitch is that in the Servers view, the state remains as
> "starting" with the task running in the Progress view indefinitely, or
> until you shut down the server.
>
> This is merely an annoyance until you want to Profile On Server. Then
> the profiler will forever wait until it's started.
>
> Rather than just complain, I looked through the plugins and fixed it.
> Ahh, the joys of OSS. Since I'm not an eclipse maintainer and this is
> my first post, maybe someone could send it to the right place.
>
> --- org/eclipse/jst/server/tomcat/core/internal/Tomcat60Configur ation.java
> +++ org/eclipse/jst/server/tomcat/core/internal/Tomcat60Configur ation.java
> @@ -76,7 +76,7 @@
> while (iterator.hasNext()) {
> ServerPort port = (ServerPort) iterator.next();
> // Return only an HTTP port from the selected
> Service
> - if (port.getName().equals("HTTP/1.1") &&
> port.getId().indexOf('/') < 0)
> + if ((port.getName().equals("HTTP/1.1") ||
> port.getName().startsWith("org.apache.coyote.http11.Http11") )&&
> port.getId().indexOf('/') < 0)
> return port;
> }
> return null;
> @@ -129,9 +129,9 @@
> if (protocol != null &&
> protocol.length() > 0) {
> name = protocol;
> protocol2 = protocol;
> - if
> ("HTTP/1.1".equals(protocol) ||
> protocol.startsWith("org.apache.coyote.http11.Http11"))
> - contentTypes =
> new String[] { "web", "webservices" };
> }
> + if ("HTTP/1.1".equals(protocol)
> || protocol.startsWith("org.apache.coyote.http11.Http11"))
> + contentTypes = new
> String[] { "web", "webservices" };
> String secure =
> connector.getSecure();
> if (secure != null &&
> secure.length() > 0) {
> name = "SSL";
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02546 seconds