Hello,
I try to automate a Database export from a JSP page.
I made a bash script and when I call it from a Telnet it's work fine but when a try from my jsp page that dosent work.
Note it's work with a simple command like "ls" but not with my script. I have checked the right for the script file and if a do manualy thru Telnet it's work !!
//----my JSP page ---
Process exportDb = Runtime.getRuntime().exec("myBatchScript"
try { exportDb.waitFor();
BufferedReader br = new BufferedReader(new InputStreamReader(exportDb.getInputStream()));
while(br.ready()) {
exportOutput = br.readLine();
out.println(exportOutput+"<br>"
}
br.close();
} catch (InterruptedException ie){
ie.printStackTrace();
System.out.println("A problem occured whith process"
}
TKS
Olivier
I try to automate a Database export from a JSP page.
I made a bash script and when I call it from a Telnet it's work fine but when a try from my jsp page that dosent work.
Note it's work with a simple command like "ls" but not with my script. I have checked the right for the script file and if a do manualy thru Telnet it's work !!
//----my JSP page ---
Process exportDb = Runtime.getRuntime().exec("myBatchScript"
try { exportDb.waitFor();
BufferedReader br = new BufferedReader(new InputStreamReader(exportDb.getInputStream()));
while(br.ready()) {
exportOutput = br.readLine();
out.println(exportOutput+"<br>"
}
br.close();
} catch (InterruptedException ie){
ie.printStackTrace();
System.out.println("A problem occured whith process"
}
TKS
Olivier