Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing and Servlets

Kiran Sahadev
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On a html page there are two options of viewing data. One is display and the other is print. when the user clicks on the display button, data can be viewed on the screen.
However when the user clicks the print button the data should not be displayed on the screen instead it should go directly to the printer. I'm using a servlet for displaying data.
For the print function , I'm using a class which implements the printable interface.The data to be printed is passed as a string.
The problem is I cannot create an object of this class in a servlet.
The exceptions thrown are ClassDefNotFound,DuplicationError,ClassFormat Error etc.
So how do I go about it.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic