permaculture playing cards*
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 Android Security Essentials Live Lessons this week in the Android 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.
 
wood burning stoves
 
subject: Can I run any DOS or Shell Script in a Servlet or JSP?
 
Similar Threads
What does @ do, as in: c:\java -classpath % c:\blalba\... A.B.C.Class %@
Trapping of different shells like DOS,Unix
just started
Tomcat installation on windows 2000
running in dos, not command window in windows