• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP out put to printer

 
vikas mishra
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any one tell me how can i send out put of jsp file to the printer without displaying it on to browser in linux
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not.
I know the answer is very short, but more text isn't needed.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is a big security reason (You goto a site and 500 pages start printing, you would love that), plus if you are to display it, and use JavaScript to automatically print it, it will still pop up the print dialog box.
Eric
 
Jayson Falkner
Author
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vikas, the important point to understand is that when using HTTP/HTML you can't do this. Your server has little control over the client's computer, certainly not enough to even know if a printer is attached. At best you can use JavaScript to prompt the client if they wish to print something.
If you really need to do something such as automatically print documents, you will need to use a technology that lets you. Java Web Start is a great place to start, it lets you run full-blown Java applications on the client's computer.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!