Bug 32031

Summary: Can't create "http" connector for an Embedded tomcat
Product: Tomcat 5 Reporter: Youcef HILEM <youcef.hilem>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: critical    
Priority: P3    
Version: 5.5.4   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Youcef HILEM 2004-11-02 21:29:22 UTC
Embedded embedded = ...
...
embedded.createConnector((InetAddress)null, 8080, false);

This last call logs this message : Couldn't create connector.

It seems that the method :
   public Connector createConnector(String address, int port, String protocol)
return always null when the protocol is "http".
Comment 1 Youcef HILEM 2004-11-02 22:19:48 UTC
I Have fixed the bug like this :

....
if (protocol.equals("ajp")) {
    connector = new Connector("org.apache.jk.server.JkCoyoteHandler");
} else if (protocol.equals("memory")) {
    connector = new Connector
("org.apache.coyote.memory.MemoryProtocolHandler");
} else {
    connector = new Connector();
    if (protocol.equals("https")) {
       connector.setScheme("https");
       connector.setSecure(true);
       // FIXME !!!! SET SSL PROPERTIES
     }
}
....
Comment 2 Remy Maucherat 2004-11-03 12:02:59 UTC
Those calls are not very useful IMO, but it's now fixed.