• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TOMCAT SSL - beginner problem

 
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I cannot get a simple SSL exercise (from Murarch's Servlets and JSP 2nd ed P529) to work.

1) My servlet.xml contains


2) I then generated my keystore file as follows, using "changeit" as my password(s)


3) Then, after restarting TOMCAT my http 8080 port works fine as such


4) But my secure https 8443 port doesn't like this


5) Interestingly, a http 8443 works OK


Is anybody able to help?

Thanks

Marten

[ April 05, 2008: Message edited by: marten kay ]

[ April 05, 2008: Message edited by: marten kay ]

[ April 05, 2008: Message edited by: marten kay ]
[ April 05, 2008: Message edited by: marten kay ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to add keystoreFile and keystorePass to the <Connector ../> tag in your server.xml file.

keystoreFile needs to contain the full path and filename of your keystore and the keystorePass, obviously, needs to contain the password that you used when you created it.
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ben,

I had tried something similar, based on one of your earlier posts.

So, I created my keystore.kdb using
C:\Program Files\Java\jdk1.6.0\bin>keytool -genkey -alias tomcat -keyalg RSA -keystore ./keystore.kdb

then my server.xml has


I restart Tomcat, then https://localhost:8443/ still can't load a page.

Any other ideas?
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...and then I made a mistake in my password!

It works now thanks for your help
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glad it's working.
Thanks for posting back with the solution.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One quirk I thought I'd mention.

The first and last name field should actually be the domain that you will use to access the server. In your case, if you put in 'localhost', you will avoid one of the error messages that the browser will popup. The other is that the certificate authority is unknown. There is not getting around that with a self signed cert.
 
I knew that guy would be trouble! Thanks tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic