Java Reference
In-Depth Information
Click here to view code image
java-home \bin\keytool -export -alias client-alias -storepass
changeit
-file client.cer -keystore client_keystore.jks
4. Add the certificate to the truststore file domain-dir /config/cacerts.jks .
Run keytool from the directory where you created the keystore and client
certificate. Use the following parameters:
Click here to view code image
java-home \bin\keytool -import -v -trustcacerts -alias client-alias
-file client.cer -keystore domain-dir /config/cacerts.jks
-keypass changeit -storepass changeit
The keytool utility returns a message like this one:
Click here to view code image
Owner: CN=localhost, OU=My Company, O=Software, L=Santa Clara,
ST=CA, C=US
Issuer: CN=localhost, OU=My Company, O=Software, L=Santa Clara,
ST=CA, C=US
Serial number: 3e39e66a
Valid from: Tue Nov 27 12:22:47 EST 2012 until: Mon Feb 25
12:22:47 EST 2013
Certificate fingerprints:
MD5: 5A:B0:4C:88:4E:F8:EF:E9:E5:8B:53:BD:D0:AA:8E:5A
SHA1:90:00:36:5B:E0:A7:A2:BD:67:DB:EA:37:B9:61:3E:26:B3:89:46:32
Signature algorithm name: SHA1withRSA
Version: 3
Trust this certificate? [no]: yes
Certificate was added to keystore
[Storing cacerts.jks]
5. Restart GlassFish Server.
Using Form-Based Login in JavaServer Faces Web Applications
This section describes strategies for implementing form-based login in JavaServer Faces
applications.
Using j_security_check in JavaServer Faces Forms
The most common way of authenticating a user in web applications is through a login
form. As described in “Form-Based Authentication” in The Java EE 6 Tutorial: Basic
Search WWH ::




Custom Search