home *** CD-ROM | disk | FTP | other *** search
/ Java Developer's Companion / Java Developer's Companion.iso / binaries / Windows / jsdk / README.netscape < prev    next >
Encoding:
Text File  |  1997-07-21  |  4.8 KB  |  128 lines

  1.  
  2. Servlet Support for Netscape
  3. ----------------------------
  4. This package allows servlets to be run in Netscape's Enterprise 2.x, 
  5. FastTrack 2.x and Enterprise 3.0 servers.
  6.  
  7. Installation
  8. ------------
  9. As with any system software installation, it is important to ensure that
  10. you have good backups before you begin.  Please backup your system.
  11.  
  12. These instructions assume that you already have a copy of Netscape's
  13. server installed.  Below, <ns-home> refers to the server's root directory.
  14. In Unix, it might be something like /usr/ns-home. Under Windows NT, it
  15. may be a directory like D:\Program Files\Netscape\Server.
  16.  
  17. In addition, it is assumed that you have the Java Servlet Development Kit
  18. (JSDK) installed in the directory <jsdk-home>.
  19.  
  20. You will next need to unzip the contents of <jsdk-home>/lib/classes.zip
  21. into the directory <ns-home>/plugins/java/local-classes to install the
  22. servlet support classes for Netscape's server.  For example, on Unix,
  23.  
  24.     % mkdir /usr/ns-home/plugins/java/local-classes
  25.     % cd /usr/ns-home/plugins/java/local-classes
  26.     % unzip /usr/local/jsdk/lib/classes.zip
  27.  
  28. Or under Windows NT, 
  29.  
  30.     D:> cd D:\Program Files\Netscape\Server\plugins\java\local-classes
  31.     D:> unzip D:\jsdk\lib\classes.zip
  32.  
  33. Ensure that Java is enabled for your server.  The steps to do this are
  34. typically: 
  35. 1) start the Netscape administration interface
  36. 2) select the server you wish to manage.
  37. 3) select the Programs button.
  38. 4) select Java from the sidebar.
  39. 5) make sure that the "Run Java" option is set to yes.
  40.  
  41. For exact instructions, check your server documentation.
  42.  
  43. Next, you need to modify the file <ns-home>/https-<host>/config/obj.conf
  44. as follows, where <host> is the host name of the machine running the server.
  45. Instead of https-, the directory name may begin with httpd in FastTrack.
  46.  
  47. 1. Under the rules for object "default", add the following line immediately
  48.    following the NameTrans rule for /server-java:
  49.  
  50.    NameTrans from="/servlet" fn="pfx2dir" dir=<servlet-dir> name="servlet"
  51.     
  52.    where <servlet-dir> is the directory where servlets will be stored (for
  53.    example, <jsdk-home>/servlets)
  54.  
  55. 2. At the end of the file add the following three lines to create a rule for
  56.    object "servlet":
  57.  
  58.    <Object name="servlet">
  59.    Service fn="java-run" class="sun/servlet/netscape/NSRunner" vpath="/servlet" initfile="<nshome>/https-<hostname>/config/servlets.properties"
  60.    </Object>
  61.  
  62. Please check the README file for information on the contents of the 
  63. servlets.properties file.
  64.  
  65. There is an additional step necessary for Enterprise Server 3.0 only.  After
  66. manually updating the obj.conf file, it will be necessary for you to tell the
  67. server to recognize the changes.  This is done in the following way:
  68.  
  69. 1) start the Netscape administration interface
  70. 2) select the server you wish to manage.
  71. 3) select the Apply button in the upper right hand corner.
  72. 4) click on the Load Configuration Changes button.
  73.  
  74.  
  75. Assuming that the above steps have been performed correctly, after restarting
  76. your server you should be able to invoke any servlet in <servlet-dir> with the 
  77. following URL syntax:
  78.  
  79.      http://<host>/servlet/<servlet name>/...
  80.  
  81. Anything following the servlet name will be passed to the servlet as
  82. PATH_INFO and QUERY_ARGS information.
  83.  
  84. If you have problems
  85. --------------------
  86.  
  87. The most likely cause of problems with Netscape servlets is that the
  88. server-side Java VM is misconfigured.  To find out if your VM is misconfigured,
  89. try:
  90.  
  91. http://<host>/server-java/BrowserDataApplet
  92.  
  93. If this Netscape supplied url doesn't work for you, server side Java is not
  94. running correctly on your server.  Please consult your server documentation
  95. for help in this matter.
  96.  
  97. Some hints:
  98.  
  99. The two most common causes of VM misconfiguration are setting your CLASSPATH
  100. variable before starting the server, and failing to enable server-side Java.
  101.  
  102.  
  103.  
  104. Limitations
  105. -----------
  106. Current limitations in this release:
  107.  
  108. 1. If a servlet class file is changed, then you will need to restart the
  109.    server in order for the change to take effect.
  110.  
  111. 2. The servlets run under Netscape's VM.  This means all servlets _must_
  112.    be compiled with the 1.0.2 version of the JDK, and use only 1.0.2 classes.
  113.    For information on when Netscape will support 1.1 in their server VM,
  114.    please contact Netscape.
  115.  
  116. 3. The netscape VM does not fully handle multithreading.  As a result, you
  117.    may see multiple VMs started, with some terminating.  This will cause 
  118.    servlets which rely on in memory state information to fail.  The init()
  119.    and destroy() methods should be used to save and restore state information.
  120.  
  121. 4. If the servlet properties file is changed, you will need to restart the
  122.    server in order for the change to take effect.
  123.  
  124. Problems
  125. --------
  126. If you have any feedback on this JSDK release then please send email to
  127. java-server-feedback@javasoft.com.
  128.