Mike,
> I know this sounds strange, but I have the need to run a Perl script
> that is invoked by a servlet. Not my choice. Forced on me by a content
> vendor (they use Perl). Does anyone know of a servlet that does this
> or whether the new forward() method will work.
Suggestions:
1) Check out JPL, the Java/Perl Lingo tool, which is now a standard
part of the Perl distribution (since version 5.005_54), according to:
http://www.perl.com/pub/1998/12/jpl-announce.html
Since your clients are the ones requiring Perl, presumably they
have some perl expertise, so you might want to punt the
preliminary research here to their Perl guy. Finding things on
the perl website can sometimes be ludicrously easy, sometimes
ludicrously difficult.
2) Ask the client if they want to consider Python instead of Perl.
There's a pure-java port of the Python interpreter (just instantiate
a python interpreter object and feed it the script, whee! Should be
pretty easy to find at www.python.org under the name JPython) Or
JACL, a java port of the TCL interpreter.
3) As an earlier poster suggested, perhaps your best bet in terms of
simplicity within java, would be to have them set the perl scripts
up as CGI scripts and invoke them from your java program using a
URL object.
4) This is a wild guess, but java.runtime.exec() might have something
to do with your needs. A quick look at the class library API
references suggests it might apply, though it doesn't clearly state
that it's used for executing external, non-java programs. But, hey,
you can handle the legwork from here.
Let us know how your project turns out and what solution you end
up using!
Steven J. Owens
[EMAIL PROTECTED]
[EMAIL PROTECTED]
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html