It is considered bad design to do this kind of thing in a JSP page; you should move the code to a backing bean or a servlet.
Note that web apps do not have a concept of a default directory; you need to use absolute paths, both for files and -just to be safe- for the java command as well.
Lastly, be sure to follow all advice given in this article.
That can't be determined by looking at it from the outside. If you don't know what it is by looking at the server directory structure, then you need to use the servlet context's getRealPath method.
you should better not try to do it, because that a Web app is running in a Web container such as tomcat and it just run as a thread of the container. when the app is running, you should let the container to manage the app but not you to do it.
you should better not try to do it, because that a Web app is running in a Web container such as tomcat and it just run as a thread of the container. when the app is running, you should let the container to manage the app but not you to do it.
I'm not sure what you're trying to say - Runtime.exec start an OS-level process that runs outside of the servlet container. Where do you think servlet container threading comes into play?
I have one jar file which takes two files as arguments and gives one files as output.
I want to make one web interface that give two input files to jar file(which is on server) and get output file from server.