• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is there a way I can print in servlets??

 
Charlie Boss
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an html form with checkboxes, and each checkbox represents a different document i'll be generating dynamically.
say a user checks multiple boxes and clicks on my "print documents" submit button I want to send all the dynamically created documents to whatever printer they are using.
Is there a way I can send multiple HTML documents to a printer using servlets?
 
S Chandra Mohan
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Charlie,
If ur using the same sevlet for generating the documents
u can do so by putting them in a loop, which will print everything in the same HTML file.
If ur using different servlets, then have generic servlet which will get the request and will redirect to the specific servlets depending upon the choice made.
All the best
S Chandra Mohan
 
Ganesh Anekar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,
Use Javascript Function window.print() for printing any doc.
Call this function in u r file ..onClick event or use any event
It will work...
Ganesh
 
Charlie Boss
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx for the answers.. here are some more questions specific to printing..
can i use the java.awt.print package to print html documents from a servlet??? if so how can i..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic