Q:

How to generate jssecacerts file in java 7

I have developed an enterprise application which has an independant module for sending mails. For this purpose I have used Java Messaging Services(JMS). And I have used ActiveMQ for message broker services.
Kindly appreciate if anyone could mention URLs of the tutorials which contains step by step process to create and configure jssecacerts file for above purpose. 
Server environment is listed below.
Java version: 7
Operating system: CentOS 5.9 server
Application server: JBoss 6 M2

A:

You can use keytool utility to 

Generate a cert in a keystore 
Export the cert out from that keystore
Optional: Sign the certificate with a CA
Add the cert to a truststore 

Examples here:
http://docs.oracle.com/cd/E18930_01/html/821-2435/ablqz.html#ghlgv
Finally, you would tell your application to use the cert like so:
System.setProperty("javax.net.ssl.trustStore","<location of trustStore>");
System.setProperty("javax.net.ssl.trustStorePassword","<password>");
System.setProperty("javax.net.ssl.keyStore","<location of keyStore>");
System.setProperty("javax.net.ssl.keyStorePassword","<password>");

