Hi,
I am using iplanet webserver 4.1. I want to call a java class from
ssjs file. But I am not getting the result. I have created a java class
file and put it in the folder <Server>\Netscape\Server4\bin\https\jar
folder. But I am not sure whether it is the right location to put the
class file. Also I would like to know how to put the class file in jar
format. The Java file and the ssjs file code given below.
Java part
package pdfbase;
import netscape.javascript.*;
public class Testcase {
public Testcase(){}
public int getValue()
{
return 1;
}
}
Javascript part
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<SERVER>
write('<HTML>');
write('<HEAD>');
write('<TITLE>Call 3 Java</TITLE>');
write('</HEAD>');
write('<BODY>');
write('<form name=form1>');
write('<h3>Javascript calling java</h3><br>');
var sObj = new Packages.pdfbase.Testcase();
var iVal = sObj.getValue();
write('<b>'+iVal+'</b>');
write('</form>');
write('</BODY>');
write('</HTML>');
</SERVER>