Look this code:
Code: Select all
File barcodeFile = new File("dynamicbarcode");
if (!barcodeFile.exists()){
barcodeFile.createNewFile(); //enter here when running on production enviroiment
}
BarcodeImageHandler.saveJPEG(BarcodeFactory.createCode128(adesao.getChaveAcesso()), barcodeFile);
barcode = new DefaultStreamedContent(new FileInputStream(barcodeFile), "image/jpeg");
How can I solve this issue? maybe permission? or some setting is missing?
My Development enviroiment: Eclipse + Tomcat 6 running under Windows Plataform
Production Enviroiment: Tomcat 6 running under Ubuntu 12.04
Primefaces v.3.4.1
JSF 2.0