Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

How to include an executable file in JSP

 
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
 
Author and all-around good cowpoke
Posts: 13078
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:
 
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic