0

Hi I need to call a shell script from a server side java script and in shell script i need to connect to DB2 database and delete some data in few tables. Can any one help me because I am new to server side script and also shell script

1
  • what server side js container are you using? Commented Nov 11, 2010 at 9:16

1 Answer 1

0

Java Script is executed at client side,

Probably you need to make ajax call in order to execute shell script at server.

Use DWR Direct Web Remotting .call a Java method from java script and in that method execute shell script like

rtime = Runtime.getRuntime();
Process child = rtime.exec(/bin/bash);
Sign up to request clarification or add additional context in comments.

2 Comments

javascript can run Server Side as well. See Node.js
@Midhat I didn't say java script run at server , I just suggested to make ajax call to server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.