Print issues due to an extra "/"
Chris Riccio
criccio at clacorp.com
Mon Jun 7 13:21:38 PDT 2004
I'm working with the cups api in my application and there are some times when there seems to be a "/" added to the Printer url.
In the logs I get:
get_printer_attrs: resource name '//printers/DevPrinter' no good!
But when I debug and look at my Objects, I see that...
Cups.address = localhost
Cups.path = /printers/DevPrinter
Cups.port = 631
Cups.protocol = http://
Cups.site = http://localhost:631/printers/DevPrinter
All of this looks right to me.
Here is my code...
==================================================================================
URL cupsURL = new URL( "http://localhost:631/" );
Printer printer = getPrinter( getBranchIdFromPrimaryUser( request ), docType );
URL printerURL = new URL( cupsURL.toString() + "printers/" +
printer.getElectronicAddress() );
Cups cups = new Cups(printerURL);
cups.cupsPrintFile(filename.toString(), null);
==================================================================================
When using Tomcat as my server, I get a "Read Timed out" error. When using Websphere, I get no error on screen, but I get unusually long print times. Anyone have any info on a way to solve this issue?
Thanks in advance.
Chris
More information about the cups
mailing list