0

How to embed an application (.exe etc) into a jsp page if a user clicks on the icon for the app on jsp. It automatically opens the interface for the app. It should seem as if the app is running on browser. How do we do this?

  • Do you mean embed like flash player ? They are written as 'plugin' for each browser. There is no JSP way for it. – Jayan Apr 09 '12 at 05:09
  • You have to be a lot more precise on what you want to do. There is no way to handle ALL programs the same way. In general there is no solution to that that could be answered in a way that’s suitable for SO) – Angelo Fuchs Apr 09 '12 at 05:52
  • I want to embed an exe file in my jsp which starts running on the clients machine when the user clicks on it without downloading it. i need the code to call an app – Meenakshi Bhayana Apr 09 '12 at 05:57
  • The answer is: NOT AT ALL. This is not possible. Code that shall be executed on the client side HAS TO BE downloaded to the client side. (How else should the client processor know what bits to process?) – Angelo Fuchs Apr 09 '12 at 06:06
  • Ok i have downloaded the exe. Now when a button is pressed on the web page, it should open the app. How can this be implemented – Meenakshi Bhayana Apr 09 '12 at 06:19
  • @MeenakshiBhayana You may want to a) accept the answer of Alexey below and b) have a look at Java Web Start (its a part that downloads a Java Program to the Clients computer and executes it) That Java Program then has the possibility to launch other programs (like the exe). - However, if you have any further questions you should ask a new question with the new details that you have now. - Be aware: a JSP can not (and will not ever be able to) start an exe on the client machine. Period. Impossible. By design. – Angelo Fuchs Apr 10 '12 at 21:14

2 Answers2

3

If you want to run a program on a client, this is not possible. See How can I run a program or batch file on the client side?

Community
  • 1
  • 1
Alexey Berezkin
  • 1,513
  • 1
  • 10
  • 18
-6

Runtime rt = Runtime.getRuntime(); Process proc = rt.exec("your app path");

AurA
  • 12,135
  • 7
  • 46
  • 63
  • 1
    This does not what the OP described he wants to. – Angelo Fuchs Apr 09 '12 at 05:51
  • It's not possible to embed an serverside Application, i.e. exe file into a JSP. You can embed an Object tag ` ` into your JSP. This will open embed the Application into the page. It requires the client to have the Application installed is not really a part of the JSP it's part of the rendered HTML Page. – andih Apr 09 '12 at 06:00
  • Yes i want to do something of this sort only. I have downloaded the exe. Now i want to run it on my jsp page – Meenakshi Bhayana Apr 09 '12 at 06:20