File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Printing In Servlet Using Apache Tomcat" Watch "Printing In Servlet Using Apache Tomcat" New topic
Author

Printing In Servlet Using Apache Tomcat

Raghava Nagaraj
Greenhorn

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)...


42
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Printing In Servlet Using Apache Tomcat