Hi all,
I need to execute a command file from a
JSP. I am using
Tomcat 4.0.3.
Here is the code :
I just wanted to
test if this will work, so tried to do run notepad.exe. But in my actual project, i need to run some other commands from a bat file or cmd file.
I have a html page , when i click a button there , it will call the above jsp , and this jsp will execute the command file.
If i run the above
java statements using a simple java program, it works fine, it opens a notepad and explorer window. but if i do the same thing in jsp, why doesn't it work? Is there any security problem? no exception is shown . Is it a problem with tomcat?
I also tried to import the java class in jsp and call the function, but still didnt work.
Please let me know whats the problem, and how to execute command files from jsp.
Thanks
Priyha