Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

perl script handled by java

by tart (Beadle)
on Nov 23, 2011 at 03:51 UTC ( #939584=perlquestion: print w/ replies, xml ) Need Help??
tart has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I am not sure if this is the right place to ask this question but I have no options so here I am,

I want to know if there are ways jsp can interact with perl script.

From GUI(JSP) I want to,
1. execute the perl script.
2. capture the STDOUT generated by perl script.
3. check for error $?.
4. handle STDIN.

So I am just looking for suggestions from experienced Monks if there are any libraries available in java to make the java and perl interaction reliable to achieve what I want to do please let me know.
I am novice programmer so please feel free to post your suggestion (whatever you have in your mind) regarding what I want to achieve,

Appreciate any suggestion,

Thanks

Comment on perl script handled by java
Re: perl script handled by java
by Anonymous Monk on Nov 23, 2011 at 07:36 UTC

    So I am just looking for suggestions

    Look in the manual, use system/process as search term. Heck, you can even use STDIN/STDOUT/STDERR. This is universal. It should take all of 1 minute with a good search engine.

Re: perl script handled by java
by Utilitarian (Vicar) on Nov 23, 2011 at 11:33 UTC
    Tomcat supports CGI, so an AJAX call to the Perl script within the JSP template is one possible workaround.

    print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://939584]
Approved by Ratazong
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2014-12-29 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (193 votes), past polls