Calling Shell/Perl script from Struts application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nghivo
    New Member
    • Apr 2007
    • 17

    Calling Shell/Perl script from Struts application

    I have a Struts application developed following the MVC method (forms, actions, beans, etc)..

    I have a JSP page with 2 buttons A and B. When B is clicked, a Struts action will be executed.

    But when A is clicked, I want to execute a script (ksh or Perl) on the server and get the response back to my form thru the use of (Javascript AJAX) Http Request object (hence, w/o refreshing my JSP page).

    So far so good except that instead of executing the script, the content of the script is returned back to my JSP page.

    Does any one know how to set up for a JSP page in Struts framework to call a Shell/Perl/C executable residing in the same domain ?

    Thanks
Working...