Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

perl from java servlet

807589Nov 19 2008 — edited Nov 19 2008
I've searched googles and these forums. I have read a lot of information about this, and I thought I was doing it right, but for some reason I cannot figure out why it's not working.

Trying to invoke a perl script from a java servlet:
try
{
     Process process = Runtime.getRuntime().exec("perl http://my.url.com/perl/script.pl");
     process.waitfor();
}
catch (Exception ex)
{
     // doesn't get here..
}
The perl script is generating an XML file and storing it at http://my.url.com/xml/file.xml. If I go to the location of script.pl directly in my browser, the xml file is correctly updated. When my servlet is run, however, the script doesn't seem to be invoked, because the xml file does not update. No exceptions are being thrown. Any ideas as to what the problem might be? Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2008
Added on Nov 19 2008
5 comments
169 views