Is there any way one can print a file from Java or Javascript or from JSP? Is yes, can you please provide with the appropriate code? I am creating a file on SunOS Unix Box from JSP.

I want to display a printer icon (as GIF file) and when the user clicks the printer icon, the regular printer option should pop up as it pops up when one clicks print menu from Word or Excel. One should then be able to select the required printer and click Ok to print just the same way as one prints from any windows application such as Word, or Excel or NotePad, or WordPad.