I have an application written in JSP running in Apache Tomcat Server and back end is MySQL and m having problem in my code tried many things
like creating a .bat file but dint got a code to run .bat file from jsp page.
Also the following code i tried but not working
______________________________________________________________________
String user = "root";
String password = "root";
String database = "egateway";
String filepath = "e:\\data.sql";
String stmt1 = "mysqldump" + database + "-u" + user + "-p" + password + "- default-character-set = gb2312 - result-file =" + filepath;
try {
Runtime r = Runtime.getRuntime ();
Process p = r.exec(stmt1);
p.waitFor();
out.println ( "data has been exported to the file" + filepath + "successfully nidhish");
}
_____________________________________________________________________
i know how to do it command prompt but how in jsp page dont know please help me
___________________________________________________________
catch(IOException e)
{
e.printStackTrace ();
}