aspose file tools*
The moose likes Servlets and the fly likes servlet calling perl script - script hangs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet calling perl script - script hangs" Watch "servlet calling perl script - script hangs" New topic
Author

servlet calling perl script - script hangs

peter rapier
Greenhorn

Joined: Jul 24, 2001
Posts: 4
Using tomcat on NT4.0, and cygwin perl is being used since it implements the perl alarm() fcn on windows. The servlet can invoke the script using:
Process p = Runtime.getRuntime().exec(theScript);
the script starts, does a dns lookup and some ftp commands succeesfully but hangs once it starts doing an ftp put. Works if I put the command line in a ".bat" file and execute "start name.bat" above but I need the exit value of the script.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12676
    
    5
Are you grabbing the output of the process? You need to accept the output stream and error stream or the process can freeze up.
Bill

------------------
author of:


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet calling perl script - script hangs
 
Similar Threads
FTP FILES TO A DIFFERENT SERVER
ftp in crontab is not working
servlet calling perl script
Input redirection in Java
My (thin) Perl experience