It's not a secret anymore!*
The moose likes Servlets and the fly likes Can I run any DOS or Shell Script in a Servlet or JSP? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Can I run any DOS or Shell Script in a Servlet or JSP?" Watch "Can I run any DOS or Shell Script in a Servlet or JSP?" New topic
Author

Can I run any DOS or Shell Script in a Servlet or JSP?

Ely Yang
Greenhorn

Joined: Oct 27, 2003
Posts: 7
Hi!
I need your help for this question:
I want to run DOS and Shell commond remotely from a servlet or JSP and get the result as a test file or any other format? Is it possible?
How should I do for this ?
Any suggestion and commend are welcome and appriacted!
Thanks!
Ely Yang


Ely Yang
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Yes, it's possible. Read the Javadoc for Runtime (here) especially the exec() method.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I run any DOS or Shell Script in a Servlet or JSP?