Invoking a process on the server from a servlet

2002-01-22 Thread Stephen Clarke
I have the following code in my servlet, where 'out' is the HttpServletResponse object. Runtime t = Runtime.getRuntime(); try { Process proc = t.exec( c:\\TaskInfo.exe ); out.write( invoked ); } catch ( java.io.IOException ioe ) { out.write( ioe.toString() ); } What I'm

RE: Invoking a process on the server from a servlet

2002-01-22 Thread Wagoner, Mark
The problem is due to NT (or 2000) not allowing the Tomcat service to interact with the desktop. If you bring up Task Manager, you will probably see your invoked process running, but it can't create window. In fact, the only way you will now be able to get rid of it will be to kill it in Task

RE: Invoking a process on the server from a servlet

2002-01-22 Thread Brian Adams
Mark is correct. If you want you can have the servlet write to a file every time you get a visitor and then write a seperate program that runs in your tooltray. The other program should read the file and when a new line is written then popup what ever it is you want to see. If it is in the your

RE: Invoking a process on the server from a servlet

2002-01-22 Thread Randy Layman
A few other thoughts of accomplishing the same thing: 1. You could enable Interact with desktop in the service that would allow it to open windows (but open huge security holes). Also if your site gets popular this will consume lots of memory when you can't close the windows as

Re: Invoking a process on the server from a servlet

2002-01-22 Thread Stephen Clarke
- Original Message - From: Wagoner, Mark [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, January 22, 2002 3:45 PM Subject: RE: Invoking a process on the server from a servlet The problem is due to NT (or 2000) not allowing the Tomcat service to interact with

RE: Invoking a process on the server from a servlet

2002-01-22 Thread Wagoner, Mark
If you want the messages to appear real-time, I think the previous suggestion to send a TCP message to a waiting listener app would be you best bet. This app could just sit there with an open window that scrolls any messages that it receives. -Original Message- From: Stephen Clarke

RE: Invoking a process on the server from a servlet

2002-01-22 Thread Brian Adams
Good points. I would NOT use interactive desktop at all. the program will die when you log out. don't do it! :) -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 22, 2002 9:21 AM To: Tomcat Users List Subject: RE: Invoking a process on the server

Re: Invoking a process on the server from a servlet

2002-01-22 Thread Stephen Clarke
OK. Thanks to all. The thread got discombobulated in my reader. Anyway, I think I'll just write to a file and check it manually, or with a perl doo dad. TCP is a whole nother project. {:=o Thanks again to all who replied. -- Best, sc -- To unsubscribe: mailto:[EMAIL PROTECTED] For