• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Printing and Servlets

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I once met a man from Nantucket. He had a tiny ad
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic