How can I print only a portion of the page and not the whole window from JSP? Calling a JavaScript function and performing window.print(), prints the whole window.

K Dobey

There may be an easier solution but one idea might be to use JavaScript. Open a new browser window and write the data you want to print into that. You can also format it any way you want using conventional HTML syntax. Then trigger an onload event on this window to call your javascript function that invokes window.print().

Take care - You may encounter portability problems with window.print() - I think Netscape handles it a little differently.