Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Inside a JSP, how to print a file located in a Websphere server ?  RSS feed

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've got a JSP with a PRINT button.
When I click on that button, I want to be able to print a file which is located on a Websphere server.
One way would be to implement the dos command "PRINT" but it seems difficult to implement on a LAN printer.
a bit like this:

import java.lang.System;
import java.lang.Runtime;
public class play
{
public static void main(String args[]) throws Exception
{
Runtime r = Runtime.getRuntime();program\
//To print a file named test.txt located in drive "C:" on a HP
// machine connected to the System named vinoth. The code would look like
// this:

String s[] = {"d:\\winnt\\system32\\print.exe","/D:\\vinoth\\HP","c:\\test.txt"}
r.exec(s);
}
}


Now, how do I print a file located on a server and not on the local computer ?
thanks for your help
[ June 09, 2004: Message edited by: Max longbeach ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Max,
Are you trying to print on the server or on the client receiving the html code from the jsp?
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to print on a printer, connected to the client.
But, I am not opening the file.
In other words, I am trying to print a file without opening it.
Maybe I should use javascript for that ?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!