Posts

Showing posts with the label jvm options

Reading properties file at glassfish starttime

Goto JVM options (server-config) and add this line -Dproperty.file.path=......filepath/einvoice.properties einvoice.properties: smtp.address = localhost ipcommerce.url = http://someipcommerceurl.com/ email.body = Plese check the attachment for invoice. email.subject = Invoice file.create.location = /home/shakeelstha/Interac\ Liferay\ Repo/invoice file.upload.location = /home/shakeelstha/Interac\ Liferay\ Repo/upload jasper.location = smtp.mail.password = smtp.mail.username = root mail.sender.address = Interac<shakeelshrestha@lftechnology.com> ContextListener.java package com.lftech.interac.listener; import com.lftech.interac.dto.EInvoiceProperty; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; /**  *  * @author shakeelstha  */ public class ContextListener implements ServletContextListener {     @Override     public v