It depends on where you want to print to. If you want to print to the screen, use PrintWriter and out.print. If you want to print to an error log, use System.out.print. Or are you talking about printing to a printer?
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
And is the printer connected to the server or the client? Most HTML/Browser applications which have a "print" button, just use it to produce an alternatively formatted version of the same data which will print sensibly.