-----Original Message-----
From: Randy Layman <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, April 16, 2001 9:31 PM
Subject: RE: How can I run Batch file from servlet ??
>
> When you create a process like this, its up to you to read and write
>to the process. This means that any output from your batch file will be
>lost unless you deal with is (Process has methods to get the input and
>output streams for standard in/out/error).
>
> I would suggest you try running your batch file from the tomcat's
>home directory. The problem is usually one of two things. Either you have
>relative paths which aren't valid in the current context or you are
>expecting environment variables that aren't valid. (Or possibly its
>actually working but you aren't catching the batch file's input to know
>that).
>
> Randy
>
>
>> -----Original Message-----
>> From: Sunil Chandurkar [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, April 16, 2001 11:47 AM
>> To: [EMAIL PROTECTED]
>> Subject: How can I run Batch file from servlet ??
>>
>>
>> Hello All !!
>>
>> I am in big trouble, i want to call batch file on the server
>> from the servlet. I have tried the following option but they
>> didn't work.. please let me know if is there any way to do it...
>>
>> Process p = Runtime.getRuntime().exec
>> ("cmd D:\\myFolder\\myBatchFile.bat");
>> p.waitFor();
>>
>> also i have tried without cmd option:
>> Process p = Runtime.getRuntime().exec
>> ("D:\\myFolder\\myBatchFile.bat");
>> p.waitFor();
>>
>> Its not throwing an exception and not even giving me any output..
>>
>> Thanx in Advance...
>>
>> /sunil
>> i desperately want to know where i can find mod_jserv for windows can any
one help me.
YOUR SINCERELY
Shivakanth
>>
>>
>> _____________________________________________________________
>> Get LifeTime Free email Visit ---> http://www.nagpurcity.net
>>