How to Terminate JSP Process
use:
out.close(...
Saturday, December 21, 2013
How to generate .XLS file in Java using Apache POI
How to generate .XLS file in Java using Apache POI
String contextName = request.getContextPath().substring(1);
HttpSession hs = request.getSession();
String path = hs.getServletContext().getRealPath("/" +
contextName);
char pathSep = new File(path).separatorChar;
path = path.substring(0, path.lastIndexOf(pathSep + contextName));
path = path...
How to generate .XLSX file in Java using Apache POI
How to generate .XLSX file in Java using Apache POI
First you need to download from
apache site:
http://www.apache.org/dyn/closer.cgi/poi/dev/src/poi-src-3.8-beta3-20110606.zip
Extract zip file and copy listed below file in you Libraries folder
under NetBeans.
1)
poi-3.9-20121203.jar
2)
poi-examples-3.9-20121203.jar
3)
poi-excelant-3.9-20121203.jar
4)
poi-ooxml-3.9-20121203.jar
5)
poi-ooxml-schemas-3.9-20121203.jar
6)
poi-scratchpad-3.9-20121203.jar
7)
xmlbeans-2.3.0.jar
8)
dom4j-1.6.1.jar
Create...
Html to pdf in java struts.
Html to pdf in java struts.
import com.lowagie.text.Document;
import com.lowagie.text.Element;
import com.lowagie.text.PageSize;
import com.lowagie.text.html.simpleparser.HTMLWorker;
import com.lowagie.text.html.simpleparser.StyleSheet;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.pdf.codec.Base64;
import java.util.ArrayList;
import...