Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
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
The Duke's Bookstore application runs on the JSDK2.1. First download the JSDK 2.1.
It is 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.The Duke's Bookstore application is packaged so that it can be easily installed and run on the JSDK server. The complete binary and source code for the application is packaged in the zip archive
tut-bookstore-21.zip
. To install the application in the JSDK server, download the zip archive into the directory,JSDK2.1_HOME/webpages
and unzip it. When you unzip the archive, the.class
files (both the server classes and the helper packagescart
anddatabase
) will be deposited inwebpages/WEB-INF/servletsThe only manual step that you need to perform is to add the servlet propertiescontained in the file
webpages/bookstore/servlets.properties
to the filewebpages/WEB-INF/servlets.properties
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.
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
Feedback Form |