I want to execute DOS command "net config workstation" from jsp file. When i execute the below snippet from simple java class it is executing and giving me the output. But once i tried to execute this from JSP file or calling a java method where this code snippet is wriiten to JSP file, it is not execting.
final String dosCommand = "net config workstation";
final Process process = Runtime.getRuntime().exec(dosCommand);
final InputStream in = process.getInputStream();
System.out.println(" in length " + in.read());
From the simple java application class i get the in length value 67 but through JSP it is -1.