Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java Open Source > BOOK: Professional Apache Tomcat
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Apache Tomcat
This is the forum to discuss the Wrox book Professional Apache Tomcat by Chanoch Wiggers, Ben Galbraith, Vivek Chopra, Sing Li, Debashish Bhattacharjee, Amit Bakore, Romin Irani, Sandip Bhattacharya, Chad Fowler; ISBN: 9780764543722
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 12th, 2011, 10:54 AM
Registered User
 
Join Date: Jan 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default TLS-Protokoll with embedded Tomcat 6

Hi to all,

I need urgent help in implementing SSL encryption!
With the normal HTTP protocol, my application with embedded Tomcat 6 works without problems.
When I insert the following connectors, I can receive the webclient over the URL HTTP://localhost:8080
and HTTP://localhost:8443, instead of https://localhost:8443!

...

/ / Create a connector that listens on all addresses
/ / On port 8080
Connector connector = embedded.createConnector (
(String) null, 8080 false);

/ / Wire up the connector
embedded.addConnector (connector);

/ / Ssl connector
Connector sslConnector embedded.createConnector = (
(Java.net.InetAddress) null, 8443, true);

sslConnector.setProtocol ("TLS");
sslConnector.setSecure (true);
sslConnector.setEnableLookups (false);
sslConnector.setAttribute (keypass "," changeit ");
sslConnector.setAttribute ("keystore", catalina home +
"/ keys / .keystore");
sslConnector.setAttribute (ClientAuth "," false ");

/ / Wire up the sslconnector
embedded.addConnector (sslConnector);
...

I tried also the following version for the sslConnector:

...
Connector sslConnector embedded.createConnector =
((java.net.InetAddress) null, sslPort, true);
IntrospectionUtils.setProperty (sslConnector, "port", "8443");
IntrospectionUtils.setProperty (sslConnector, "SslProtocols", "TLS");
IntrospectionUtils.setProperty (sslConnector,
"keystore file", catalina home + "/ keys / .keystore");
IntrospectionUtils.setProperty (sslConnector,
"keystore pass", "kspass");
IntrospectionUtils.setProperty (sslConnector,
"keystore type", "JKS");
IntrospectionUtils.setProperty (sslConnector, "clientAuth", "false");
IntrospectionUtils.setProperty (this, "SSLEnabled", "true");

embedded.addConnector (sslConnector);
...

With the same result! It causes no errors in both trials. I can't understand the javaworld!
Can someone tell me where I make the mistake and show me a working solution?

Thanks for your helps

Andi
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ciphersuites in TLS/SSL Daniel_DA BOOK: Beginning Cryptography with Java 6 March 3rd, 2010 12:09 PM
Security + embedded tomcat allanws Apache Tomcat 0 April 29th, 2009 04:58 PM
[Tomcat 6] What is 'tomcat-users.xml'?? Bugslayer All Other Wrox Books 0 April 21st, 2009 08:06 PM
JNDI setup in Embedded Tomcat 5.0.19 Pretty Apache Tomcat 3 July 12th, 2005 06:55 AM
JWS Axis Tomcat (posted to Apache Tomcat too) rushman Servlets 0 April 15th, 2005 09:32 AM



All times are GMT -4. The time now is 01:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.