GeeCON Prague 2014*
The moose likes Servlets and the fly likes invoking Korn shell scripts from a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "invoking Korn shell scripts from a servlet" Watch "invoking Korn shell scripts from a servlet" New topic
Author

invoking Korn shell scripts from a servlet

Neeraj Vij
Ranch Hand

Joined: Nov 25, 2003
Posts: 315
How can we invoke a korn shell script from a jsp/servlet on a form submission?

Thanks,
Neeraj.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
That's what Runtime.exec and the ProcessBuilder class are there for.


Ping & DNS - my free Android networking tools app
Neeraj Vij
Ranch Hand

Joined: Nov 25, 2003
Posts: 315
thanks ulf. It will be a great help, if you could some sample code. I want to try somethnig like following under tomcat.





how can I make it work.

thanks,
Neeraj.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
Read the article, it contains plenty of sample code.
 
GeeCON Prague 2014
 
subject: invoking Korn shell scripts from a servlet