11a12
> import org.apache.tomcat.net.*;
21c22
<  *  3. add the endpoints 
---
>  *  3. add the endpoints
26,27c27,28
<  *  
<  *  You can add more contexts after start, but interceptors and  
---
>  *
>  *  You can add more contexts after start, but interceptors and
34c35
<  * 
---
>  *
35a37
>  * @author Stefan Freyr Stefansson [stebbi@decode.is]
51c53
<     
---
> 
54c56
<     
---
> 
59c61
<     
---
> 
89c91
<     
---
> 
93c95
<     
---
> 
95c97
<     
---
> 
109c111
< 	
---
> 
111c113
< 	
---
> 
113c115
<     }
---
> 	}
115,119c117,130
<     /** Add a secure web service.
<      */
<     public void addSecureEndpoint( int port, InetAddress addr, String hostname,
< 				    String keyFile, String keyPass )
<     {
---
> 	/** Add a secure web service without client authentication using the
>      *  default server socket factory.
> 	 */
> 	public void addSecureEndpoint( int port, InetAddress addr, String hostname,
> 					String keyfile, String keypass ){
>         addSecureEndpoint(port, addr, hostname, keyfile, keypass, "false");
> 	}
> 
> 	/** Add a secure web service using the
>      *  org.apache.tomcat.net.SSLSocketFactory.  clientauth specifies what kind
>      *  of client authentication is required (in this case "true" or "false").
> 	 */
> 	public void addSecureEndpoint( int port, InetAddress addr, String hostname,
> 					String keyfile, String keypass, String clientauth){
125a137,139
>     sc.setAttribute( "keystore", keyfile );
>     sc.setAttribute( "keypass", keypass );
>     sc.setAttribute( "clientAuth", clientauth );
130,131d143
< 	sc.setAttribute( "socketFactory",
< 			 "org.apache.tomcat.net.SSLSocketFactory");
137c149,177
< 	
---
> 
> 	contextM.addServerConnector(  sc );
> 
> 	}
> 
> 	/** Add a secure web service using a specific socket factory.
>      *  The secure parameter specifies if this endpoint is secure (https)
>      *  or not (http).
> 	 */
> 	public void addCustomEndpoint( int port, InetAddress addr, String hostname,
> 					boolean secure, ServerSocketFactory socketfactory)
>     {
> 	if(debug>0) log( "addCustomConnector " + port + " " + addr + " " +
> 			 hostname );
> 
> 	PoolTcpConnector sc=new PoolTcpConnector();
> 	sc.setServer( contextM );
> 	if( secure ) contextM.setSecurePort( port );
> 
> 	sc.setAttribute( "vhost_port" , new Integer( port ) );
> 	if( addr != null ) sc.setAttribute( "vhost_address", addr );
> 	if( hostname != null ) sc.setAttribute( "vhost_name", hostname );
> 
>     sc.setSocketFactory( socketfactory );
> 
> 	HttpConnectionHandler ch=new HttpConnectionHandler();
> 	if( secure ) ch.setSecure(true);
> 	sc.setTcpConnectionHandler( ch );
> 
142c182
<     
---
> 
149c189
< 	
---
> 
207c247
< 	
---
> 
264c304
<     
---
> 
279c319
<     
---
> 
298c338
< 	
---
> 
318c358
<     
---
> 
322c362
< 	
---
> 
324c364
< 	
---
> 
343c383
< 	
---
> 
361c401
< 	
---
> 
367c407
< 	
---
> 
380c420
<     
---
> 
406c446
< 	
---
> 
