| Author |
Printing a web page using the Printable class
|
Andres Delrotti
Ranch Hand
Joined: Aug 11, 2005
Posts: 98
|
|
Hello Friends, I am currently creating a reporting application. One of its features include being able to print the report page in a printable format. Now, our client wanted to eliminate the annoying printer settings UI that comes out everytime we use the window.print() javascript command to print a webpage. So in order to eliminate this, we resorted to using Java's Printable Interface in which we would just enter the Report Page's URL and let it to the print job without having the print settings UI to pop up. The print button at the Report Page would now call a Servlet which would then call the class which implements the Printable interface. Now the Problem is, The URL of the report page that we would like to print is eg. (http://localhost:9080/MyApp/PrintReportPage.do) which is a Struts link. If we input that exact url in the class that implements Printable, we could not print the report page the way we like it since THE SESSION ALWAYS TERMINATES. The page containing the error "session was terminated" was printed instead of the Report Page. Is there any way to solve this type of problem? [ August 02, 2006: Message edited by: aj delr ]
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
Ahem, you are aware of the fact that the servlet would print on the server side, not on the client side?
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
 |
|
|
subject: Printing a web page using the Printable class
|
|
|