• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to print an uploaded file  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all , i am new here. I am working on a project where a log in verification is required whenever a person clicks the print button , which when verified goes to the next page where he can choose the document to be printed.
After choosing the document when he hits the print button then that document should be printed.
Now, the problem is
How can a document file be recieved by a servlet from a form in jsp page
Like we use
request.getParameter("xyz");
In servlet for String data
What we will use to receive file?
And how i will transfer that document to printer to get printed??
 
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would a file be sent to a servlet to be printed? The servlet runs on the server. Is the file to be printed at the server? Or at the client?
 
ewaan afridi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, file is to be printed on the server.
I have used this code snippet :-

Part filePart = request.getPart("file");
to get the file from jsp.
But i don't know how to hand it over to the printer.
Please help!!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Printing is not part of servlets. I've moved this to a more appropriate forum with a change of title.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!