unable to jar file from jsp

I have created jar file. When I test that in any dos prompt it is working fine. Basically this jar file will submit a job in mainframe and get a results. So I wanted call thru my jsp page. I coded like below. But it is not working. Any help/suggestion will be much appricated
ravi

Please use code tags when posting code samples here. They make code much easier to read.

I don't see the reason that's failing, but you're not giving us much to go on. Is there an exception thrown? What's the message and stack trace? It could just be you don't have a path to that jar file. Or are you expecting the output of running that jar command to get pasted into your page? You'd need to capture the output stream from process and write it to the out object for that to work.

However, you are completely misusing JSP, which is meant only for presentation. Scriptlets, i.e. Java code inside the <% ... > tags, have been obsolete for a solid decade now. Now, calling Runtime.exec even from a servlet isn't a great practice, but it's a whole lot better than calling it from a JSP. A better way of organizing this would be to call a servlet to do initial processing, put data you needed into request attributes, and then forward the request to the JSP to render.

You'll also want to examine the command which you are trying to execute. Notice that it's generated by code, and code can have bugs. So don't just look at the code which generates the command, look at the actual command which was generated.