This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get text file printed in Java program or From JSP page?

 
Rushi Patel
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to perform billing functionality.

In which i have displayed bill on screen but now further i want to store that same in the database and that will be achieved.
Next i want to write it in TXT file and want to get that file printed.

I will manage to write the same data into that file but How to PRINT that file from my Printer in LAN through JSP Page or any JAVA program??

Any help regarding this will be appriciated...!

Thank you.
 
Tim Moores
Bartender
Posts: 2687
36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Printing -like any file I/O or DB access- should never be done in a JSP, but from a servlet or backing bean. This should help: http://docs.oracle.com/javase/tutorial/2d/printing/index.html
 
Wendy Gibbons
Bartender
Posts: 1110
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you want the user to print it on their printer, or it to appear on the servers printer?


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic