tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Embedded Tomcat 7 SSL Properties
Date Thu, 16 May 2013 09:34:58 GMT
On 16/05/2013 04:09, Chirag Dewan wrote:
> 
> 
> Sorry for the previous mail. Adding Subject.
> 
> ----- Forwarded Message -----
> From: Chirag Dewan <chirag.dewan22@yahoo.in>
> To: Tomcat Users List <users@tomcat.apache.org> 
> Sent: Thursday, 16 May 2013 8:37 AM
> Subject: 
>  
> 
> 
> Hi All,
> 
> I am upgrading my Embedded Tomcat 6 to Tomcat 7. I am adding an HTTPS connector to my
service.
> 
> Code for Tomcat 6
> 
>                     IntrospectionUtils.setProperty( this, "sslProtocol", "TLS" );
>                     IntrospectionUtils.setProperty( this, "keystore", keyStoreFile );
>                     IntrospectionUtils.setProperty( this, "keypass", keyStorePassword
);
>                     IntrospectionUtils.setProperty( this, "SSLEnabled", "true" );
>                     
> 
> 
>                     Embedded.addConnector( this );
> 
> 
> Code for Tomcat 7
> 
> 
>                     IntrospectionUtils.setProperty( this, "sslProtocol", "TLS" );
>                     IntrospectionUtils.setProperty( this, "keystore", keyStoreFile );
>                     IntrospectionUtils.setProperty( this, "keypass", keyStorePassword
);
>                     IntrospectionUtils.setProperty( this, "SSLEnabled", "true" );
> 
>                     Tomcat.getService().addConnector( this );
> 
> 
> This is just a sample code. It worked fine in Tomcat 6,but when I start the connector
in Tomcat 7 I get an /home/.keystore(my keystore file is not in the default location) not
found exception. Now I have it corrected by changing the attributes "keystore" to "keystoreFile"
and "keypass" to "keystorePass",the way it should be. 
> 
> 
> But I am puzzled,how was it still working in Tomcat 6?

keystore and keypass were internal names used for those attributes.
Tomcat 6 had code that mapped from the documented names to the internal
names but you could use the internal names directly if you knew what
they were.

One of the many code clean-ups in Tomcat 7 aligned the internal names
with the documented names and removed the mapping.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message