If Tomcat run as a embedded in eclipse, it causes problem.
If Tomcat run as stand alone, the SSL works fine. And no error or exeption found.
Even after I put keystore under path\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps
There's "Tomcat in Eclipse" and then there's "TOMCAT in Eclipse". If you are like most people, you're using the WTP plugin that comes bundled with the J2EE spin of Eclipse to run Tomcat.
One of the things I hate about WTP is that it doesn't simply use your Tomcat's config files, it makes copies of some (but NOT all of them! ) and puts them in an Eclipse workspace directory. When you change the master Tomcat configuration, you frequently have to whack WTP upside the head to get its attention; WTP won't automatically sense and apply those changes to its copy.
Which is why I use the sysdeo Tomcat plugin, myself. It doesn't play those games.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
Thank you Guys. Problem found: I had two version of JRE (1.50_22) and JRE6(1.6_15), and one JDK which is 1.6 version.
I used JDK 6 to generate .keystore, and JRE1.5 to compile and run application for Tomcat.
Anyway, I unistalled all JRE and JDK. And reinstalled JDK1.6 and JRE1.6, and re-generate .keystore with default value mentioned by Tomcat. And then it works.
No time to find the detail reason. It works now.