|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Newbie question : execute host OS command
Hey:
My Web page needs to execute UNIX shell scripts. Can we accomplish this in Java Servlets / JSP ? What are the steps involved? (I am new to both these technologies) |
|
#2
|
|||
|
|||
|
Look into Runtime.getRuntime().exec(String)
|
|
#3
|
|||
|
|||
|
Can you elaborate the steps?
|
|
#4
|
|||
|
|||
|
What code do you have so far? Are you saying you have never done any servlets/java and want to know how to do it from start to finish? Not to be rude, but if so, you have a lot of reading ahead. You first need to learn java, then you need to learn servlets/jsp, after that using the Runtime object to run the shell script will be nothing.
Java tutorial Sun tutorials J2EE tutorials (go to the WEB section) Runtime exec |
|
#5
|
|||
|
|||
|
Thanks much Nemi for pointing to the resources. Yup, I am a newbie in the technologies you mentioned :-)
|
|
#6
|
|||
|
|||
|
If you are simply looking for the easiest way to run shell scripts from a web server then servlets/jsp would not be what I would recommend. Servlets/jsp's are very powerful, but they have a significant ramp up time to learn. You could accomplish the same task faster and easier using perl/cgi, php or possibly server side includes (SSI).
|
|
#7
|
|||
|
|||
|
Nemi:
I have been hearing about PHP and how easy it is learn and accomplish the tasks I have mentioned. Looks like Servelets/JSP is far more difficult path for me. Can you point resources for PHP that would help me in accomplishing these tasks? thanks |
|
#8
|
|||
|
|||
|
I used to do a lot of PHP, though I don't any more. The best resources I found are:
The devshed php forum (this site) - very helpful and popular. The many tutorials on this site as well. www.php.net - has about all you will ever need for installing and function resources. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Newbie question : execute host OS command |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|