JavaServerTM Web Development Kit, Version 1.0.1
JSWDK released: October, 1999
Last update to this file: October 1, 1999
Please read the License Agreement that applies
to this software.
The JavaServerTM
Web Development Kit (JSWDK) is the reference
implementation for the JavaServer Pages technology
and the JavaTM Servlet API.
This release
of the JSWDK supports JSP 1.0 and the Java Servlet API 2.1.
The JSWDK contains a Web container that runs JSP files and
Java servlets. The Web container has a servlet
engine for developing and testing servlets, a simple HTTP Web
server, and a JSP engine.
The JSWDK also includes the source files for the
javax.servlet and javax.servlet.jsp packages
and their Javadoc API documentation. These packages are the
JavaServer Pages and Java Servlet APIs.
System Requirements
Operating System
This release works on the following platforms:
-
Windows NT 4.0 Service Pack 4
-
Solaris 2.6 and 2.7
-
Windows 98
-
Red Hat Linux 6.0 (JDK is available at http://www.blackdown.org)
JDK version
Environment variables
-
Add the full path of the JDK bin directory (where the java command
is located) to the PATH variable.
- For Windows NT: To set the path permanently, select Start -> Control Panel. Select System,
then Environment, and look for Path in the User Variables and System
Variables.
- For Window 98 and Windows 95:
Open and edit the AUTOEXEC.BAT file and add or change the PATH
statement. To do so, click Start-> Run and enter Sysedit.
-
If you are using JDK 1.2, you also need to do one of the following:
-
Add the tools.jar file (in the JDK lib directory) file to your CLASSPATH
variable.
-
Set the JAVA_HOME variable to the location of the JDK directory.
Installing the JSWDK
Once you have downloaded the tar or zip file,
move it to the directory where you want
to install the JSWDK and extract its contents. (In Windows,
simply use Explorer and double-click on the icon for the downloaded file.
You will need WinZip or another compatible file utility.)
This process automatically creates a subdirectory (by default, jswdk-1.0).
Starting and Stopping the Server
The JSWDK includes Unix shell scripts and Windows batch files to start
and stop the server. These are in the jswdk-1.0 directory.
To
run the JSWDK and view the examples, you need to run these scripts
from the jswdk-1.0 directory.
-
For Windows: To start the server, open the directory with Windows Explorer
and double-click on STARTSERVER.BAT.
(If this doesn't work, you can try opening a DOS window and running
it from there.)
To stop the server, double-click on the STOPSERVER.BAT file.
For graceful shutdown, use this instead of simply closing the MS-DOS
command
window.
-
For UNIX: Run the startserver shell script to start the server:
% startserver
Run the stopserver shell script to stop the server:
% stopserver
For graceful shutdown,
use this command
instead of simply killing the server process.
Accessing the Server
In any Web browser, enter either of these URLs:
http://localhost:8080
http://<your-host-name>:8080
This lets you use the server and browse through the
examples. The opening page you see includes links to
Javadoc documentation
as well as JSP and servlet examples.
You can change the default port from 8080 - see
the next section, "Configuring the Server."
Configuring the Server
The webserver.xml file (which is in the main JSWDK directory,
jswdk-1.0)
lets you adjust server and application settings, including
attributes such as the default port, document base location,
and the URI request mapping.
The syntax of the different options is described in the file itself.
To change the default port for the Web server from 8080 to 80 (or some
other number), add the port="number" statement to the <Service>
tag, for example:
<WebServer id="webServer">
<Service id="service0" port="80">
<WebApplication id="examples" mapping="/examples" docBase="examples"/>
</Service>
</WebServer>
See the contents of the webserver.xml file for the other options that you can edit.
Known Bugs
-
Automatic servlet reloading is not implemented in this version of the JSWDK.
-
The JSP engine treats buffer size in characters instead of bytes.
When you use the page directive with the buffer=size
attribute, the size you enter is handled as a size in characters, rather
than a size in kilobytes.
Bugs Fixed in This Release
This version of the JSWDK
is a bug fix release,
correcting the following bugs:
- Earlier versions had a bug in handling data sent from the client to the
server by an HTTP POST method. This bug caused the error
message Connection reset by peer to appear in the user's Web browser. This
bug has been fixed. You can now use the HTTP POST method in a JSP file
to send data from
an HTML form to the Web server.
- The shell scripts startserver and stopserver,
for starting and stopping
the JSWDK server on UNIX systems, are no longer specific to the Korn shell.
You can now run the scripts safely from any UNIX shell.
- In earlier versions, character set encoding that you defined using
<%@ page
contentType="xxx" charset="xxx" %>
in a JSP file was not handled correctly when the JSP page was
compiled. With some character sets, this caused the JSWDK engine
to stop running. This bug has been fixed.
The contentType
and charset attributes of the page directive
now work correctly.
- In earlier versions, JSP files with the same filename but
stored in different
directories were compiled to the same Java
.class file,
so that an existing
.class file was overwritten when a
new JSP file was compiled. This bug has been
fixed. You can now
create JSP files with the same file name in different
directories.
- In addition, this release of the JSWDK is certified safe for Y2K
processing. If you use this version, you should not encounter errors related
to changing dates to the year 2000.
Troubleshooting
-
Close the DOS window (the error can corrupt its CLASSPATH variable).
-
Open a new DOS window.
-
Click on the MS-DOS icon at the top left of the window.
-
Select the Properties option.
-
Click on the Memory tab.
-
Adjust the Initial Environment drop-down box from Auto to 2816.
-
Click OK.
-
Start the server.
-
Truncated file names
On Windows systems,
if you do not use a standard, WinZip-compatible tool to unzip the download file,
your tool may truncate file names to eight characters when it extracts the files.
(For example, the startserver.bat file will now be startser.bat.) In this
case, the scripts, batch files and links will not work. Make sure that
your unzip utility supports file names longer than eight characters.
-
Unhandled error! error message
If the JSWDK engine cannot find the tools.jar file when compiling
JSP pages, it will report the following error message:
Unhandled error! You might want to consider having an
error page to report such errors more gracefully.
Java.lang.NoClasssDefFoundError: sun/tools/javac/Main
To fix this problem, add the tools.jar file from the JDK lib directory
to the CLASSPATH variable in the startserver.bat file or to the CLASSPATH
environment variable.