Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Tomcat 6 NIO connector & startup
Tomcat 6 NIO connector & startup [message #195449] Tue, 03 July 2007 03:08 Go to next message
Dave Thomas is currently offline Dave ThomasFriend
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 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
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";
>
>
>
Re: Tomcat 6 NIO connector & startup [message #195771 is a reply to message #195557] Thu, 05 July 2007 22:52 Go to previous message
Dave Thomas is currently offline Dave ThomasFriend
Messages: 3
Registered: July 2009
Junior Member
bug #195599 reported as requested
Previous Topic:JNDI browser in Webtools
Next Topic:Case problem with org.eclipse.wst.wsdl
Goto Forum:
  


Current Time: Tue Mar 19 07:38:27 GMT 2024

Powered by FUDForum. Page generated in 0.02546 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top