This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes How to get text file printed in Java program or From JSP page? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "How to get text file printed in Java program or From JSP page?" Watch "How to get text file printed in Java program or From JSP page?" New topic
Author

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

Rushi Patel
Greenhorn

Joined: Sep 14, 2011
Posts: 17
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
Rancher

Joined: Sep 21, 2011
Posts: 2407
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

Joined: Oct 21, 2008
Posts: 1098

do you want the user to print it on their printer, or it to appear on the servers printer?


 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to get text file printed in Java program or From JSP page?
 
Similar Threads
tansfer file from one pc to another
Accessing contents of a jar file
writing back to jar file ??
Java program that changes a file's extension
add timestamp with .txt file & write some information to the .txt file