Executing a shell script from a jsp page

Hi,

I'm facing a problem while executing a shell script from a jsp page.

I'm using Runtime.exec() function.

It's working fine for single statement scripts.But if the script consists of any database processing and some other processing statements,it's not returning the correct exit status of the process.

Will u please help me in this.

If there is any other ways to execute a shell script from a jsp page other than Runtime.exec() like RMI etc,.If so let me know.

Thanks in advance.

[529 byte] By [tsnrscreen] at [2007-11-26 12:16:40]
# 1

Hello,

It's hard to help you but what you can do is listening to the outputs of your script, you should read the output stream and error stream and send them to the default console.

Check this excellent article : http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4

Best regards,

Olivier.

oliviero at 2007-7-7 14:53:05 > top of Java-index,Archived Forums,Socket Programming...