JavaServer Web Development Kit (JSWDK) 1.0.1
JSWDK released: October, 1999
Readme last update: September 21, 1999
Please read the License Agreement that applies
to this software.
The JavaServerTM Web Development Kit (JSWDK) is the reference
implementation for JSP and the JavaTM Servlet API. This release
of JSWDK supports JSP 1.0 and the Servlet API 2.1.
The JSWDK contains a simple servlet engine for developing and testing
servlets, the javax.servlet and javax.servlet.jsp package
sources (which are the JSP and Servlet APIs), and API documentation. The
JSWDK also contains a simple HTTP web server and a JSP-enabled engine.
Requirements
Operating System
This release has been tested on the following platforms:
-
Windows NT 4.0 Service Pack 4
-
Solaris 2.5 and later
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,
select 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 (from the JDK lib directory) file to your CLASSPATH
variable
-
Set JAVA_HOME to the JDK directory
Installing JSWDK
Once you have downloaded the file, move it to the location where you want
to install the JSWDK and extract the contents of the file. (In Windows,
simply use Explorer and double-click on the icon for the downloaded file.
You will need a WinZip-compatible decompression 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 main JSWDK directory. In order to
view the examples and the default JSWDK page, these scripts need to be
run from the main JSWDK 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.
Use this instead of simply closing the STARTSERVER window for a cleaner
exit.
-
For UNIX: Run the startserver shell script to start the server:
% startserver
The stopserver shell script stops the server. For graceful shutdown,
use this instead of simply killing the server process.
Accessing the Server
Use any web browser to access the following address:
http://localhost:8080, or http://<your-host-name>:8080
This lets you browse the server. It includes links to Javadoc documentation
as well as JSP and Servlet examples.
You can change the default port from 8080 - see Configuring the Server
below.
Configuring the Server
The webserver.xml file (which is in the base JSWDK directory)
lets you adjust server and application settings, including default port
and directory mapping and locations.
The syntax of the different options is described in the file itself.
To change the default port for the webserver from 8080 to 80 (or some
other number), add the port="<portnum>" 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 file for the other options that you can edit.
Known Bugs/Limitations
-
Automatic servlet reloading is not implemented in JSWDK.
-
The JSP engine treats buffer size in units of characters instead of bytes.
Troubleshooting
-
Out of Environment Space error message
On Windows 95/98 systems, you may see an "Out of Environment Space"
error message when starting the server. This happens if Windows provides
too small a space for environment variables. To work around this limitation:
-
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
If you are not using a standard, WinZip-compatible decompression tool,
it may truncate file names to eight characters on decompressing 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 will support file names longer than eight characters.
-
Unhandled error! error message
If the startserver.bat file cannot find the tools.jar file when compiling
JSP pages, it will report an error message like the following:
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 starterserver.bat file, or simply add
it to the CLASSPATH environment variable.