Java Web Server(tm) 2.0  

Release Notes


Contents / Index / Glossary / AdminTool Help
This document contains:

Quick List

Known Issues

Documentation Changes

Documentation moved
The product documentation directory has been moved to the top level of the Java Web Server installation. In addition, a default file-alias has been set up to allow access to the documentation through the following URL:
  http://hostname:port/doc/

It is recommended that this file alias be removed when the Java Web Server is deployed to avoid customers inadvertently accessing the product documentation.

Access improved
A Table of Contents has been added and the Index expanded to provide faster, easier access to information.

New documentation
Information has been added on the following topics:

Code Changes

JavaTM 2 now supported
Java Web Server 2.0 supports, but does not bundle, the new JavaTM 2 SDK, Standard Edition, v 1.2 (formerly code-named "JDK 1.2"). To run the Java Web Server with the Java 2 SDK, you must use the following startup command:

  jserv -javahome <path to Java 2>

When using -javahome option, you must point to a full JDK image (which includes javac). For Java 2 support on Solaris, this means that you must install the development tools package (SUNWjsdev) in addition to the runtime package (SUNWj2rt).

For the latest Solaris Java 2 SDK and associated Operating System patches, please see:

http://www.sun.com/solaris/java

New version of JRE being bundled
Java Web Server 2.0 now installs, and uses by default, Java Runtime Environment (JRE) 1.1.7. The new JRE is expected to further enhance the Java Web Server's performance.

Using the Solaris implementation of the JRE, rather than the reference implementation, means threads are now native and not green as earlier. Consequently, command options referencing green threads are no longer valid. For instance, the "-threads green" option of the httpd (or jserv) command is no longer valid.

Other releases of the JDK or JRE (such as 1.1.6) may also work with Java Web Server 2.0, but they are untested and therefore unsupported.

Startup script refined
The jserv startup script has been revised to improve functionality, increase portability between different VM implementations, and aid in troubleshooting startup problems.

The following changes have been made to the design of jserv:

vmargs.txt
File for providing arguments to VM.
For javawebserver VM, located in server_root/properties/server/javawebserver/vmargs.txt

A template version of the vmargs.txt file is provided in the above location. The file contains additional detail and commonly used commands. The file as shipped is inactive because all lines are commented out. To activate one of the commands in the file, simply uncomment it.

Note: In the vmargs.txt file, the first character must be either # for comment or - for system command.

The following changes have been made to the jserv command-line arguments:

-D
Still supported but spaces in system properties must now be quoted
Defines system properties to be passed to the adminserver and javawebserver VMs.
-threads
No longer supported as -green or -native (default) can be specified in vmargs.txt file instead.
Used to set threads as native or green for the server.
-javacmd
Newly supported
Allows the user to specify the java runtime executable to invoke, such as java_g or jrew.
-classpath
Deprecated in favour of -cp
Prepends specified path to that of the CLASSPATH environment variable

Administration requirements changed
The Administration Tool is now JDK 1.1 based and therefore requires a JDK 1.1-compatible browser to use. This should pose little difficulty as recent versions of the major browsers are acceptable, including: Netscape Navigator 4.06, Netscape Communicator 4.5, Microsoft Internet Explorer 4.0, and HotJava Browser 1.1.5

Servlet API updated
Java Web Server now supports Java Servlet API 2.1. As a result, the following servlet API methods now return NULL (or an empty enumeration):

To provide backwards compatibility with Servlet 2.0, two compatibility flags have been added. They are the servlets.2.0.compatiblity property in:

server_root/properties/server/javawebserver/webpageservice/servlets.properties
server_root/properties/server/javawebserver/sessionservice/session.properties
 
where server_root is the location of the Java Web Server 2.0 installation.
Additional details are provided the .properties files themselves.

Removal of Proxy service
Java Web Server no longer includes the simple proxy service.

Sample Servlets moved
Samples servlets are no longer stored under the system/ directory or listed by default on the servlets screen of the Administration Tool. Sample servlets can now be found in a top-level examples/ directory, along with information on what the sample does and how to run it.

JavaServer Pages now supported
The Java Web Server 2.0 final product supports the JavaServer Pages 1.0 specification. Because of the Java Web Server's production schedule and the only very recent finalization of JavaServer Pages 1.0 as we were "going to press", user documentation on this feature is limited. However, a short quickstart, some reference material (including the specification), and a list of website resources are provided and should be sufficient to get you started.

Earlier Betas of the Java Web Server 2.0 product supported JavaServer Pages 0.92. These two specifications, 0.92 and 1.0, differ significantly. Developers should not expect pages developed with 0.92 version of the specification to be compatible with the 1.0 version.

For the convenience of our customers, we have not removed the earlier JavaServer Pages 0.92 support or examples from the final product. While the default is 1.0 support, you can modify the setup after installation to engage the 0.92 support instead.

Page Compilation being deprecated
Page Compilation (.jhtml) is being deprecated in favour of JavaServer Pages (JSP). JavaServer Pages technology, which is based on the "open standards" process, is a more powerful and portable solution to the problems of dynamic content generation.

Page Compilation files (.jhtml) will continue to run under Java Web Server 2.0 but such support is not guaranteed in future releases. It is recommended that you use JavaServer Pages for new development and consider porting your legacy applications to this new standard.

Authstore improvements
The list of imported root certificates is now viewable in the Authstore utility. In addition, the messages in the help panel have been expanded.

New NetDynamics plugin servlet provided.
Java Web Server 2.0 now includes a servlet that communicates with an existing NetDynamics application server. The servlet, ndservlet, forwards URL requests to an intermediary plugin server (provided with the NetDynamics server) which then passes the request to the application server.

To take advantage of this servlet, you must have a NetDynamics application server installed and running. Then follow these steps:

  1. Configure the servlet

    To configure ndservlet, edit the plugin.nd file in the server_root/properties directory. Modify the server.address entry in the plugin.nd file to provide the address of the host on which the plugin server is running and the port on which it handles requests.

    For example:

    server.address=localhost:14500
  2. Access the servlet

    Send a request of the following form to the Java Web Server for forwarding to the NetDynamics application server.

    http://Java_Web_Server_host:Java_Web_Server_ port/servlet/ndservlet
    For example:
    http://schnauzer:8080/servlet/ndservlet

For more information on the NetDynamics application server and plugin server, see their website at http://www.netdynamics.com/

Source code customers only

In addition to other changes noted in this file, source code customers should be aware of the following changes from the Java Web Server 1.2 source code release:

Closed Bugs

This section contains a listing of the more important bugs fixed in the Java Web Server 2.0 release.

Troubleshooting

Page-compilation

If you use a Java Runtime Environment (JRE) other than the one provided with the Java Web Server, you may experience problems with your Page Compilation (.jhtml) files. This is because Page Compilation uses the Java byte-code compiler (javac), which is included in the bundled JRE provided by the Java Web Server but not included in a standard JRE (a subset of the JDK).

To remedy the problem, either use a Java Development Kit (JDK), which will include the missing javac compiler, or switch to the Java Web Server's default JRE.

Troubleshooting Servlets

The sendRedirect and sendError methods of HttpServletResponse are convenience methods. Each is intended to be the only method called in response to a request.

sendRedirect and sendError each create a complete response object by performing the following calls: setStatus, setHeader (in the case of sendRedirect), setContentLength, and then a series of println's. For this reason, neither sendRedirect nor sendError should be used where you need to manage a part of the response explicitly. (For instance, you would not call either of these methods just after you set the status or just before you print to the output stream.)

If you use the sendRedirect or sendError methods incorrectly (for instance, in conjunction with println),you will get a "write past end of stream" error message.

The CLASSPATH Environment Variable and the Java Web Server

People are sometimes confused about how the CLASSPATH variable is used with the Java Web Server. Here's a quick overview.

The Java Web Server ships with a Java Runtime Environment (JRE). By default, the Java Web Server uses this included JRE--which means you don't have to be concerned about your CLASSPATH or JAVAHOME settings, their values are ignored unless you explicitly say otherwise when you start the server.

If you want the Java Web Server to find and access additional classes (for example, ones you've written), you can do this in any of the following ways:

In all of the above cases, server_root refers to the directory containing the installed Java Web Server product.

Removing Java Web Server on the Windows Platform

On Windows NT 4.0, if you installed the Java Web Server as an NT service, you must remove it in the following order:
  1. Shut down the Java Web Server
     
  2. Issue a command to de-register the Java Web Server with the NT Service manager.
    1. C> cd server_root\bin
    2. C> jservsvc JavaWebServer remove
    3. where server_root is the name you chose for the directory into which you installed the product. By default, the install program names that directory JavaWebServer2.0

  3. Remove the Java Web Server itself.
    1. Click on the Control Panel.
    2. Click on Add/Remove Programs.
    3. Highlight on the Java Web Server entry in the window and then click on Add/Remove.
       
  4. Remove any leftover files.

    1. C> cd path-to-installed-JavaWebServer
    2. C> rmdir JavaWebServer2.0 /s /q

Permissions on Files (Solaris only)

Some files and directories are not created when the Java Web Server is installed. Instead, they are created by the server runtime the first time the server is started. (The server_root/system/sessionSwap directory is one example.) Permissions on these files and directories are granted based on the user running the server at this initial time.

For example, if you run the server for the first time as a usernameA, the sessionSwap directory is owned by usernameA. Subsequent runs by any other user (including root) will result in error due to permission problems.

To correct this problem, use the jschangeowner script in the bin/ directory of the installed Java Web Server. The script changes the ownership of such files as logs, sessionSwap, properties, and realms to allow writing by the new owner.

Changing Your Admin Password and Default Port

Once you have installed the Java Web Server on your system and logged in to the Administration Tool, it is recommended that you take the following two steps to provide additional security for your Java Web Server:

For details on doing how to perform these steps, see the Properties document.

If You Have Lost Your Password

If, by chance, you change your Administration password and then forget it and can no longer get access to the Java Web Server Administration Tool, you can recover by following these steps:
  1. Stop your Java Web Server
  2. In your favorite text editor, open the file
    server_root/realms/data/adminRealm/keyfile
  3. Change the admin line there so that it reads:
    admin::YWRtaW4=
  4. Save the file.
  5. Restart your Java Web Server
  6. You can now access the Administration Tool using admin as the login and password .

If you are Locked Out of the Java Web Server

Although it is recommended that you take every opportunity to protect your Java Web Server by using the security tools provided with the product, it is not recommended that you assign access controls to any of the core internal servlets. Assigning access controls to any of these servlets can prevent you from having normal access to your Java Web Server. These include the admin, error, file, invoker, linkcheck, loganalyzer, snoop, cgi, and ssinclude servlets.

If, by chance, you do find yourself locked out of the Java Web Server because of the assignment of access controls to any of the core internal servlets, you can recover from this situation quite easily by editing the acl.properties file for the service in which you assigned the access controls.

To edit the acl.properties file:

  1. Change to the directory
    server_root/properties/server/javawebserver/service_name
  2. Open the file acl.properties in your favorite text editor.
  3. Look for the line that contains the name of the servlet and its realm. Comment this out or delete it from the file.

    For example, if you have set access controls on the admin servlet in the realm defaultRealm using the Access Control defaultACL the line would look like this:

    Servlet.admin=Basic:defaultRealm:defaultAcl
  4. Stop the Java Web Server processes.
  5. Close your browser then re-open it.
  6. Restart your Java Web Server.

You should now be able to log in normally to the Java Web Server.

Maintaining Security When Changing the Document Root

In some cases, changes made to the Java Web Server are not dynamic and do not take affect until the server is restarted. For example, if you have protected files in your document root directory and you create a new document root and move them there, you will lose authentication on them until you restart the server.

If you change your document root and move protected files to it, you must restart the server.

To restart the server:

  1. Open the Administration Tool.
  2. Select Web Service.
  3. Select Stop.
  4. Select Restart.

File Descriptors

Due to the streamlined single-process nature of the Java Web Server, a large number of file descriptors may be in use at any one time. On some systems under high load, the default number of file descriptors your system supplies may not be enough. If your system begins to run out of file descriptors, you may see failed class loads messages, refused sockets, and other errors related to not being able to open files. To find out how to increase the number available to your process, please consult your operating system documentation.

Changes Requiring Server Restart

If you find that changes you have made do not seem to be getting updated in the Web Server, try restarting it. Restarting the server should ensure the necessary update for tasks such as the following:

Additional Sources of Information

Whether you're trying to troubleshoot a particular problem or just wanting to see what other Java Web Server users are talking about, don't forget to check out the following resources:
Top
java-server-feedback@java.sun.com
Copyright © 1999 Sun Microsystems, Inc.
All Rights Reserved.