Posts

Showing posts from April, 2012

Nepal Zip Code Lists

Download Zip Code list from here

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

Simple Invoice Creation With Jasper Report

Image
<?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="invoicePdf" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="30" rightMargin="30" topMargin="30" bottomMargin="50">     <property name="ireport.zoom" value="1.5"/>     <property name="ireport.x" value="0"/>     <property name="ireport.y" value="140"/>     <property name="ireport.callouts" value="##Fri Mar 30 16:17:30 NPT 2012"/>     <style name="table">         <box>             <pen li