[184717] Avoid assigning ports in the server instance the same id by using the correct index variable.  Also a minor update to the connector naming for Tomcat 4.0.x.
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Configuration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Configuration.java
index eee16e9..18009d9 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Configuration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Configuration.java
@@ -46,7 +46,8 @@
 	protected static final String HTTP_CONNECTOR = "org.apache.catalina.connector.http.HttpConnector";
 	protected static final String SSL_SOCKET_FACTORY = "org.apache.catalina.net.SSLServerSocketFactory";
 	protected static final String TEST_CONNECTOR = "org.apache.catalina.connector.test.HttpConnector";
-	protected static final String APACHE_CONNECTOR = "org.apache.catalina.connector.warp.WarpConnector";
+	protected static final String AJP_CONNECTOR = "org.apache.ajp.tomcat4.Ajp13Connector";
+	protected static final String WARP_CONNECTOR = "org.apache.catalina.connector.warp.WarpConnector";
 
 	protected Server server;
 	protected ServerInstance serverInstance;
@@ -143,11 +144,13 @@
 						}
 						if ("HTTP".equals(protocol))
 							advanced = false;
-					} else if (APACHE_CONNECTOR.equals(className))
-						name = "Apache Connector";
+					} else if (AJP_CONNECTOR.equals(className))
+						name = "AJP Connector";
+					else if (WARP_CONNECTOR.equals(className))
+						name = "Warp Connector";
 					String portId;
 					if (instanceServiceName != null && instanceServiceName.equals(service.getName()))
-						portId = Integer.toString(i);
+						portId = Integer.toString(j);
 					else
 						portId = i +"/" + j;
 					if (className != null && className.length() > 0)
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Configuration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Configuration.java
index 3cd2c54..ef0ebf2 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Configuration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Configuration.java
@@ -157,7 +157,7 @@
 						name = "Apache Connector";
 					String portId;
 					if (instanceServiceName != null && instanceServiceName.equals(service.getName()))
-						portId = Integer.toString(i);
+						portId = Integer.toString(j);
 					else
 						portId = i +"/" + j;
 					if (className != null && className.length() > 0)
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Configuration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Configuration.java
index 89cc787..5f47115 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Configuration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Configuration.java
@@ -139,7 +139,7 @@
 						advanced = false;
 					String portId;
 					if (instanceServiceName != null && instanceServiceName.equals(service.getName()))
-						portId = Integer.toString(i);
+						portId = Integer.toString(j);
 					else
 						portId = i +"/" + j;
 					ports.add(new ServerPort(portId, name, port, protocol2, contentTypes, advanced));
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Configuration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Configuration.java
index 1183246..02990ab 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Configuration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat55Configuration.java
@@ -139,7 +139,7 @@
 						advanced = false;
 					String portId;
 					if (instanceServiceName != null && instanceServiceName.equals(service.getName()))
-						portId = Integer.toString(i);
+						portId = Integer.toString(j);
 					else
 						portId = i +"/" + j;
 					ports.add(new ServerPort(portId, name, port, protocol2, contentTypes, advanced));
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat60Configuration.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat60Configuration.java
index b0f706e..60808eb 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat60Configuration.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat60Configuration.java
@@ -140,7 +140,7 @@
 						advanced = false;
 					String portId;
 					if (instanceServiceName != null && instanceServiceName.equals(service.getName()))
-						portId = Integer.toString(i);
+						portId = Integer.toString(j);
 					else
 						portId = i +"/" + j;
 					ports.add(new ServerPort(portId, name, port, protocol2, contentTypes, advanced));