This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes I want to use https:// over LocalHost tomcat (vista) but failed, I used Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "I want to use https:// over LocalHost tomcat (vista) but failed, I used" Watch "I want to use https:// over LocalHost tomcat (vista) but failed, I used" New topic
Author

I want to use https:// over LocalHost tomcat (vista) but failed, I used

Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 402
I want to use https:// over LocalHost tomcat (vista) but failed, I used
keytool -genkey -alias tomcat -keyalg RSA -keystore C:/Users/User/.keystore -validity 365
Is it the correct folder tomcat looks by default(C:\Users\User\)?
C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.18\bin>
I use port: 443.
https://localhost/webhomecover8/welcome.jsp simple JSP
This implies that https://localhost/ will show tomcat manager? please note this appers "Internet Explorer cannot display the webpage"...in my screen for https://localhost/.
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 402


Is it the correct folder tomcat looks by default(C:\Users\User\)?
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

Have you included the connector in the server.xml?
Something like:



And be aware that sometimes it's necessary to exclude the line


For more information have a look at http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html

[edit]
And in your example you forgot to include the port in your URL.
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 402
same problem, after your suggested two steps done:

http://localhost:8080/webhomecover5/welcome.jsp view success
http://localhost:8080/ view success

problem:
https://localhost:8443/webhomecover5/welcome.jsp view "Internet Explorer cannot display the webpage"

https://localhost:8443/manager/html view "Internet Explorer cannot display the webpage"

in the certificate creation last 2 inputs, are Tomcat password, correct?
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Do you see that the connector for https port 8443 is started in the console (or catalina log file) ??

When I generate a home made keystore with the keytool, I use this syntax - and this one is working with my Tomcat(s) (all versions):
Replace the <..> with your own values...


Regards, Rene Larsen
Dropbox Invite
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 402
solved, found:

keystoreFile="C:/User/User/.keystore"
this must be
keystoreFile="C:/Users/User/.keystore"

and also upon creation of cert password start/end must mutch....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I want to use https:// over LocalHost tomcat (vista) but failed, I used
 
Similar Threads
Can not start Tomcat 5.0 with Windows Vista
CertificateException: No name matching <hostname> found.
My *.jsp files will not execute unless in /servlet path.
using https for registring
Fake a post request from java class