aspose file tools*
The moose likes Servlets and the fly likes Calling Print services in Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Calling Print services in Servlets" Watch "Calling Print services in Servlets" New topic
Author

Calling Print services in Servlets

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 ?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Duplicate of:
http://www.coderanch.com/t/360328/Servlets/java/Printing-Servlet-Apache-Tomcat


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling Print services in Servlets