How to show progress bar in HTML file while batch-file is running -


i have written servlet run bat file. bat file copies content specified path , re-starts server. show progress bar in html page end user w.r.t batch-file progress i.e, progress bar should progress while files copying , should show server started after copy completed , restarted server.

here code:

protected void dopost(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception {         system.out.println("dopost invoked");         string buildpath = request.getparameter("buildpath");         system.out.println(buildpath);         try {             file file = new file("c:/users/hrushi/desktop/html/buildpath.txt");             filewriter filewriter = new filewriter(file);             filewriter.write(buildpath);             filewriter.flush();             filewriter.close();         } catch (ioexception e) {             e.printstacktrace();         }         runtime.getruntime().exec("cmd /c start c:/users/hrushi/desktop/helllo/hello.bat");         response.setcontenttype("text/html");         printwriter out = response.getwriter();         out.println(""); } 


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -