tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: problem with executing a batch file in tomcat JAVA servlet
Date Wed, 15 Oct 2008 16:54:50 GMT
Daniel L. Gross wrote:
> I'm trying to execute a batch file in my servlet in tomcat5.  I'm using
> the Process class exec() and issuing a command of cmd.exe /C file.bat
> Then I do a p.waitFor(); after this.  However, it appears that a few of
> the files copy, then the process hangs.  If I stop the calling program,
> the batch file completes.  Any Ideas of what's happening?

Maybe blocking waiting for you to read the output stream? Take a look at
the CGIServlet for the sort of code you might need to write.

Mark

> 
> Thanks, Dan Gross, ATLC
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message