Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Invoking an .exe from a JSP page.

 
John Varghese
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I'm new to JSP so excuse me if this sounds dumb!!
Is it possible to invoke an external executable (an .exe file) from a JSP page?
My JSP page will capture the configuration details for the program that I've written. Once the parameters have been configured, a start button on the JSP page should invoke the .exe
Is this possible? Are there any flaws/problems that you forsee?
Awaiting your inputs.
Thanks,
VJ.
 
Sean MacLean
author
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, since a JSP page is simply a servlet then I don't see why not. Try something like this,
<%
Process p = Runtime.getRuntime().exec("ls -a");
// etc ...
%>
Of course, you'd add your own command as the exec parameter.
Sean
 
John Varghese
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply, Sean.
Will there be any performance issues for such an architecture?
Regards,
VJ
 
Shubhrajit Chatterjee
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will there be any performance issues for such an architecture?

It depends. Each time you start an exe , it will be a separate Win NT process .. if the number of users are large, then ... well you can understand ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic