tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55603] New: Printing from servlet causes endles spoolling
Date Fri, 27 Sep 2013 14:37:50 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=55603

            Bug ID: 55603
           Summary: Printing from servlet causes endles spoolling
           Product: Tomcat 7
           Version: 7.0.42
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Servlet & JSP API
          Assignee: dev@tomcat.apache.org
          Reporter: jorgevpinho@gmail.com

This code works correctly in a java program (command line), but NOT when called
inside a servlet (I am currently calling from a Struts 1.2.8 Action)

I only get an endless spooling.

-- START CODE --

MyPainter myp = new MyPainter(); // Implements Printable interface

DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PRINTABLE;

PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(new JobName("myjob", Locale.getDefault()));

PrintService [] pservices = PrintServiceLookup.lookupPrintServices(flavor,
aset);

DocPrintJob pj = pservices[0].createPrintJob();

Doc doc = new SimpleDoc(myp, flavor, null);

pj.print(doc, aset);

-- END CODE --

I think it is a bug, because my code never gets called, i.e. the print() method
in the painter is never called.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message