This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to call unix shell script through servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to call unix shell script through servlet" Watch "How to call unix shell script through servlet" New topic
Author

How to call unix shell script through servlet

Sundar Subramanian
Greenhorn

Joined: Oct 19, 2005
Posts: 3
How to call unix shell script through servlet. Is it possible to call a native method which invokes a shell script?.


Sundar.S
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You need something like the following in your servlet. Read the API for more info.

Runtime.getRuntime().exec("yourshellscript.ksh")


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to call unix shell script through servlet