if (scriptName == null || scriptName.length() == 0) {
return new ModelAndView("textAnswer", "text",
"Sorry script name not setting.");
}
OSCmdRunner runner = new OSCmdRunner();
runner.setWorkDir(workDir);
runner.setScriptName(scriptName);
int resCode = runner.execOsScript();
String answerText = "Script " + scriptName
+ " processed. Result code: " + resCode + ".";
return new ModelAndView("textAnswer", "text", answerText);
} catch (Exception e) {
return new ModelAndView("textAnswer", "text", e.getMessage());