wood burning stoves 2.0*
The moose likes Servlets and the fly likes Printing In Servlet Using Apache Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Printing In Servlet Using Apache Tomcat" Watch "Printing In Servlet Using Apache Tomcat" New topic

Printing In Servlet Using Apache Tomcat

Raghava Nagaraj

Joined: Nov 05, 2004
Posts: 8
Hi All

I am Using javax.print API to print Documents through Servlet. But while Doing it in Apache Tomcat Server. Null Pointer Exception is Thrown.

PrintService service = PrintServiceLookup.lookupDefaultPrintService();

In this Code Service is Getting null Value.

If I run same programm using servletrunner . then the document is Printed!

Is their any Configuration to set in Apache ?

Waiting for Replies..!
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
There we go again, the daily dose of client/server confusion...

If you print from a servlet it will use a printer on the SERVER. If there is no printer (or the server doesn't allow the servlet to use it)...

I agree. Here's the link: http://aspose.com/file-tools
subject: Printing In Servlet Using Apache Tomcat
Similar Threads
Basic of a web service client
Apache2.0 & Tomcat
Tomcat newbie
issue with Tomcat 3.2.4
Calling Print services in Servlets