File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing In Servlet Using Apache Tomcat

 
Raghava Nagaraj
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic