[Tomcat/Struts] Lancer Script a partir d'une webapp
Bonjour,
Je ne sais pas si c'est faisable mais peux ton lancer un script .bat (ou .sh) à partir d'une action struts ?
J'appelle un script avec des parametres:
Code:
1 2 3 4 5 6 7
| Process process = Runtime.getRuntime().exec(montabdecommande);
InputStream is = process.getInputStream();
byte b[] = new byte[1024];
StringBuffer buf = new StringBuffer();
while (is.read(b) > 0) {
buf.append(b);
} |
Il me renvoit : java.io.IOException: CreateProcess: ... error=2
Associé a file not found apperement ? Je ne sais pas ou mettre mon script et si il faut faire autre chose merci d'avance,
Kal'