Start of Tutorial > Start of Trail > Start of Lesson | Search |
Like the
servletrunner
utility from the JSDK2.0, the server included with the JSDK2.1 is a small, multithreaded process that can run one or more servlets.Unlike some web servers, the JSDK server does not automatically reload updated servlets. However you can stop and restart the server with very little overhead to run a new version of a servlet.
This section shows you how to,
Preparing to Start the JSDK Server
Before you run the JSDK server, you must have a compliant JDK:
- On Sparc Solaris 2.6, the JSDK has been tested with JDK 1.1.7 & Java2 SDK 1.2
- On Windows98/NT, the JSDK has been tested with JDK 1.1.7 & Java2 SDK 1.2
It is also possible for you to configure various properties of the JSDK server before you start it. These properties include the server's port, which defaults to
8080
, the hostname of the server, which defaults tolocalhost
, and the document root, which defaults to thewebpages
subdirectory of the JSDK installation. To see or update these configuration values, edit thedefault.cfg
file in the JSDK installation directory.Finally, note that the servlets directory is located at:
doc_root/WEB-INF/servletsStarting the JSDK Server
To start the server, use the Unix-based Korn-shell script or the Windows-based batch file that the JSDK provides in the installation directory of the JSDK.
The following command starts the server on Unix:
% startserverAnd the following command starts the server on Windows:
C:\jsdk\> startserverOnce the JSDK server is executing, you can use it to test your servlets.
Starting the JSDK Server
To stop the server, the JSDK provides shut-down commands in the same directory as the start-up commands (the installation directory of the JSDK).
The following command stops the server on Unix:
% stopserverAnd the following command stops the server on Windows:
C:\jsdk\> stopserver
Start of Tutorial > Start of Trail > Start of Lesson | Search |