Ciao,
ho provato ad implementare una pagina JSP che dovrebbe lanciare la stampa di un file PDF.
Quando però provo ad eseguire la pagina ricevo il seguente errore: java.awt.print.PrinterException: No print service found.
Il sistema si basa su Apache + Tomcat 7.0. Che ci sia qualcosa da configurare?

Il codice trovato in rete che ho provato ad implementare è:

codice:
File file = new File("webapps/ROOT/test/test.pdf"); 
FileInputStream fileInputStream = new FileInputStream(file);
FileChannel fileChannel = fileInputStream.getChannel(); 
MappedByteBuffer mappedByteBuffer = fileChannel.map(FileChannel.MapMode.READ_ONLY, 0, fileChannel.size()); 
PDFFile pdfFile = new PDFFile(mappedByteBuffer); 
// Creo la pagina di stampa del PDF PDFPrintPage printPage = new PDFPrintPage(pdfFile); 
// Creo il Print Job PrinterJob printerJob = PrinterJob.getPrinterJob(); 
PageFormat pageFormat = PrinterJob.getPrinterJob().defaultPage(); 
//Calcolo il formato e i margini per un foglio A4 
float pageWidth = MediaSize.ISO.A4.getX(MediaSize.INCH) * 72;
float pageHeight = MediaSize.ISO.A4.getY(MediaSize.INCH) * 72; 
float margin = (1 / 2.54f) * 72; 
//1cm Paper paper = new Paper(); 
//Setto il formato paper.setSize(pageWidth, pageHeight); 
//Setto i margini paper.setImageableArea(margin, margin, pageWidth - 2 * margin, pageHeight - 2 * margin); 
pageFormat.setPaper(paper); 
//Valido il formato pageFormat = printerJob.validatePage(pageFormat); 
//Configuro il job di stampa printerJob.setJobName(file.getName()); 
Book book = new Book(); 
book.append(printPage, pageFormat, pdfFile.getNumPages()); 
printerJob.setPageable(book); 
// Invio la richiesta di stampa alla stampante di default 
printerJob.print();

Grazie a chi mi aiuterà!