This document has the following sections:
The Java Web Server runs on any platform that supports the Java Development Kit (JDKTM) 1.1 or above.
For Windows NT or Windows 95
To use Java Web Server, you need a server environment (to run the server itself) as well as a client environment (from which to run administrative tools).
For the server environment, you need EITHER:
Note: The Windows and Solaris distributions of this product take care of this for you; they are bundled with the JRE 1.1.4.
For up-to-date information on whether your target platform supports JDK 1.1, please contact the platform's vendor.
In addition, on Windows 95, you need:
WinSock2 may be downloaded from Microsoft's site at:
http://www.microsoft.com/win32dev/netwrk/winsock2/ws295sdk.html
Note: You cannot run the Java Web Server on Windows 95 in disconnected mode. This is because Windows 95 will not recognize local host with WinSock2 installed. (This problem does not affect Windows NT 4.0, which ships with WinSock2.)
For the the client environment, you need:
Note: Most browsers are JDK 1.0.2-compatible. Current versions of Netscape Navigator (3.0, 4.0), Microsoft Internet Explorer (3.0), and AppletViewer (1.0.2, 1.1) are known to be compatible.
% uncompress tarfileThe tar file is now ready to be installed.
% tar xvf tarfileThis creates a directory called
JavaWebServer1.1
,
which contains the product release. The
JavaWebServer1.1
directory is also called the
server_root. This term is used throughout the
Java Web Server documentation.After you have finished installing the Java Web Server, you can delete the tarfile, if you wish.
Security Note:
If you extract the Java Web Server 1.1 release on UNIXTM, using some user account other than "root", you should be aware that the "TAR" command will use your UMASK when creating directories, and this can create security holes. The distribution has no need for any files which are writable by "group" or "world".To work around this problem, either:
OR
- Restore permissions after you extract the release
chmod -R og-w JavaWebServer1.1
- Extract the release using the "p" option to TAR, to preserve the file modes found on the distribution.
% tar xvfp tarfile
.exe
) from
the Java Web Server
web site. Instructions for doing this are available at the site.
C:\JavaWebServer1.1
. The JavaWebServer1.1
directory is also called the server_root. This term is used
throughout the Java Web Server documentation.
If you click yes, an entry will be added to the Control Panels -> Services and the Java Web Server NT Service will be started up automatically and every time you restart your system.
If you click no, no entry will be made and you can still start up the NT Service as described in Starting automatically on Windows NT.
After you have finished installing the Java Web Server you can delete the temporary directory, if you wish.
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. (For this default situation, the Java Web Server uses the httpd startup script or the httpd.exe executable. )
To use your existing runtime and environment
rather than the provided JRE, invoke the httpd.nojre
startup script or httpdnjre.exe
executable.
If you are using the default JRE and its associated class path,
create a /classes
subdirectory to your Java Web Server
install directory. The default
class path will always have the classes subdirectory in the server_root directory
included. Note that these classes cannot be in jar format.
If you are using your existing runtime and class path, simply make sure the directory containing your servlets is in the CLASSPATH environment variable.
JAVA_HOME=C:"\PROGRAM FILES\JAVA"
The affected variables are PATH, JAVA_HOME, and CLASSPATH.
When first installed, no log directory is created. It is created by the server runtime the first time the server is started. Permissions on the logs 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 logs are owned by usernameA. Subsequent runs by any other user (including root) will result in a "failure to open logs" error due to permission problems.
To correct this problem, either run the server for the first time as "nobody" or reset the permissions on the logs.
To manually start the Java Web Server on Solaris:
% cd server_root/bin
% ./httpd
Note: To see logs and other information about the running
server in standard output, start the Java Web Server with the
httpd -verbose
option.
To automatically start the Java Web Server on Solaris
On Solaris systems, to start the Java Web Server whenever your machine boots, use the server_root/etc/java-server.startup
shell script. It is a standard/etc/init.d
style script and it contains installation directions. This requires setting two environment variables (pointing to the Java runtime environment and the server_root/etc/java-server.startup
directory).
On other versions of UNIX, you will need some special support that enables you to run the Java Web Server as some user other than "root". At this time, we provide this support only for Solaris SPARC platforms. However, we do provide POSIX-compatible sources for the native code needed to provide this functionality on other versions of UNIX.
To manually start the Java Web Server on a Windows platform:
C> cd server_root\bin
C> ./httpd
Note: To see logs and other information about the running
server in standard output, start the Java Web Server with the
httpd -verbose
option.
Note: The source file for httpd.exe
is called httpd.c
,
and is located in the bin
directory. If you want, you can edit
httpd.c
and then recompile it.
To automatically start the Java Web Server on a Windows NT platform:
The Windows NT service application $HTTP_HOME/bin/jservsvc
is generally installed during the Java Web Server
installation using the InstallShield facility. Once it is installed,
you can start it automatically by rebooting your machine. Rebooting sets
up your system so that each subsequent reboot automatically starts the
Java Web Server.
Note: The automatic startup of system services applies only to Windows NT, versions 3.5.1 and 4.0. Windows 95 does not support the automatic start up of system services.
If you want to run your server with a different user and group ID than nobody/nobody, then do the following:
# POSIX ONLY: # If server.user is specified, the server will change UID after # service startup server.user=nobody # POSIX ONLY: # If server.group is specified, the server will change GID after # startup. server.group=nobody
nobody
to the user and group names you have
decided upon, if any. Note that usernames with spaces are not allowed by the
Java Web Server.# chown -R userid server_root
# chgrp -R userid server_root
After you have started the Java Web Server, you can connect to the server by
displaying the default home page.
Displaying the Default Home Page
After you have started the server, you can display the default Java Web Server home
page by entering the following URL:
http://Server_Host_Name: port /
where Server_Host_Name is the name of your machine and port is 8080 by default. (For example, if your machine is named galaxy, http://galaxy:8080).
On Windows 95 and Windows NT platforms, the Server_Host_Name is the name assigned to your computer, as specified in the Network control panel. To find this name:
To set up your own web site, use your normal web authoring tools to change the contents of the default home page. Then tell your clients about your site!
On all platforms, the recommended procedure for shutting down is through the Java Web Server GUI, as follows:
Note:
If shutting down the Java Web Server through the Administration Tool is not possible or desirable for some reason, the second choice is to shut it down from a command line prompt. Instructions for performing a shutdown from the commandline for the UNIX and Windows platforms is provided in the following sections.
On all platforms, a command line utility is provide to shut down the server and its services.
% cd server_root/bin
% ./jsadmin user/password -stop
For example, in the default username and password case, you would type:
% ./jsadmin admin/admin -stop
Removing Java Web Server From a Windows Machine
or, remove it manually:
or, remove it manually by typing:
Administer the Web Server
.
Note: You can also connect to the Administration Tool by typing its URL.
For example, if the host name for your Java Web Server is bagua
, then
you enter the URL http://bagua:9090/index.html
.
Once you have logged in, you'll want to change the password for the default "admin" account. For more information on using the Java Web Server Administration, see the Administration Contents page.
NOTE: Most server properties can be changed without needing to restart the
server. However, if you change the default port, you must restart the server.
To change the default port number, use the
Network Setup page.
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:
server_root/realms/data/adminRealm/keyfile
admin
line there so that it reads:
admin::YWRtaW4=
system/doc
directory. The API documentation is installed in
/system/doc/apidoc/packages.html
.
To display the documentation, enter the following URL:
http://Server_Host_Name:8080/system/doc
You can also display the documentation by:
Clicking "Help" from any of the Server Administrator screens.
Look for Frequently Asked Questions and updates to the documentation on the Java Web Server web site.
Top java-server-feedback@java.sun.com |
Copyright © 1997
Sun Microsystems, Inc. All Rights Reserved. |