• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to include an executable file in JSP

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i include an executable file in a JSP page & if required make use of any variable in that file with in the JSP?
Executable file may be C,C++ or any file
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm assuming you want to include the output of the executable file, not the file itself. You can use Java's exec() capability to execute programs on the server with input from Java and output captured to an output page.
I would not use that code inside a JSP page directly - it gets too hard to read and REALLY tricky to debug. Create a Bean to handle the execution and you can debug the Bean off-line.
<shameless-plug>There is an example of executing a Perl script from a servlet in my book, also a debugging utility.</shameless-plug>
Bill

------------------
author of:
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vasanth,
I came across this code snippet in our IO forum from Carl. Please check.

regds
maha anna
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic