Alex,
thanx for your response. java in my php now runs. But my servlet still doesn't work. I am using javawebserver2.0. Any one who knows how to run servlets through php may please tell what all to download and how to configure it for winNT.
For all other php users with similar situation like
mine, I explain the steps I followed on winnt:
Anitha,
I thing U may also be able to run java on php using the following steps.
Pre-setup activity - I un-installed jdk1.2 and installed jdk1.2.2 downloadable from sun.
U could use php.exe or php4isapi.dll. It works with both.
Uncomment the php_java.dll from the extensions list after setting the path of extensions_dir to say "c:\php\extensions"
Make following changes to the [Java] section
[Java]
java.class.path = ".;c:\php\extensions\php_java.jar"
java.home = c:\jdk1.2.2
java.library = c:\jdk1.2.2\jre\bin\classic\jvm.dll
java.library.path = "c:\php\extensions"
Stop and then Restart your webserver. Place a php file containing java object in your webroot. You may use the following:
<?
$system = new Java("java.lang.System");
print "Java version=".$system->getProperty("java.version")." <br>\n";
print "Java vendor=".$system->getProperty("java.vendor")." <p>\n\n";
print "OS=".$system->getProperty("os.name")." ".
$system->getProperty("os.version")." on ".
$system->getProperty("os.arch")." <br>\n";
$formatter = new Java("java.text.SimpleDateFormat",
"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");
print $formatter->format(new Java("java.util.Date"))."\n";
?>
execute the above file from your browser and ... say cheers...