This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Is there a way I can print in servlets?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Is there a way I can print in servlets??" Watch "Is there a way I can print in servlets??" New topic
Author

Is there a way I can print in servlets??

Charlie Boss
Ranch Hand

Joined: May 22, 2001
Posts: 44
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?


Java Rawks
S Chandra Mohan
Ranch Hand

Joined: Oct 19, 2000
Posts: 75
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


Have a wonderful day and wish u success<p>S Chandra Mohan<br />sc_mohan_us@yahoo.com
Ganesh Anekar
Ranch Hand

Joined: May 13, 2001
Posts: 36
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

Joined: May 22, 2001
Posts: 44
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..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Is there a way I can print in servlets??
 
Similar Threads
How to print different type of document types in java ?
Printing on HTML client
Java Printing (automated)
Printing HTML file
Printing from java