Important JWS Points

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

Java Web Server

What Are the JavaServer Toolkit and Java Web Server?


The JavaServer Toolkit is a framework for building Internet and intranet servers. It
implements the functions that are common to many servers:
It listens on a port (or ports) for connection requests.
It accepts connection requests.
It creates threads to handle the requests.
It hands the connections to the threads for processing.
It manages the threads and connections.
Besides providing these basic server functions, the Java Server Toolkit makes it easier
to integrate the following advanced capabilities into the servers you develop:
Web-based remote administration
Authentication and access controls
Secure Sockets Layer (SSL)
Servlets support
HTTP 1.0 support
Dynamic Web page generation
The JavaServer Toolkit provides a framework for developing Java-based server
software. This framework was used to develop Java Web Server. Java Web Server is a
top-of-the-line, fully HTTP 1.1-compliant Web server that provides a number of attractive
features:
Java servlets can be used to replace CGI programs written in other languages.
Web pages can be dynamically compiled based on server code that is embedded
in HTML files.
User connections with the Web server can be tracked and managed as
interactive sessions.
Secure Sockets Layer and X.509 digital certificates can be used to provide
privacy, integrity, and authentication services.
Templates for the presentation of HTML content are separately managed by the
server.

Java web server is Suns full featured server product.


The following list highlights key features of the Java Web Server TM product.
1. Cross-platform
Install and run on any JDK 1.1- or Java 2-compatible platform. Written in
the Java TM programming language, Java Web Server is a "Write once, run
anywhere product.
2. Easy, local and remote administration
Monitor or configure your server from any JDK1.1-compliant web browser.
The Administration applet and tools simplify your administration tasks.
3. Dynamic web-page content
Ease your dynamic web page creation and maintenance. Java Server
Pages let you separate the programming logic used to generate content,
from the HTML layout used to present it.
4. Presentation Templates

Change the look and feel of your entire site through a single file. It's quick
and easy with presentation templates.
5. Flexible security model
Control access by user or group to website resources. Default realms are
supplied or you can create custom realms of your own.
6. Extensible
Dynamically extend server-side functionality without resorting to messy,
slow, or platform-bound scripts. Customize one of the many servlet
samples provided, or create your own -- then install, configure and manage
it using the Administration Tool.
7. Virtual host support
Host document collections from a single machine as if they were located
on different machines. Using DNS, you can even map the real and virtual
host names to different domain names.
8. Session support
Speed the development of e-commerce applications. Java Web Server
simplifies your work by managing the session lifecycle for you.
Standards based
Java 2 Platform, Standard Edition
Java Servlet API 2.1
Java Server Pages 1.0
Hyper Text Transfer Protocol (HTTP) 1.1
Secure Sockets Layer (SSL) 3.0 (in versions with SSL)
Common Gateway Interface (CGI) 1.1
Directory structures1. Admin- contents the files for administration of server.
2. Bin- contains some exe files to start server like httpd.exe, jsadmin.exe
etc
3. Cgi-bin used to store PERL prgs.
4. Doc- Contains documentation of JWS.
5. Examples- Contains some sample files of servlets, rmi, servlets, jdbc,
applet-servlet
6. Jre- files for storing bean files.
7. Lib contains library files for JWS API.
8. Public_html used to store HTML files.
9. Servlets- used to store class files of servlets.
This document provides instructions for accessing the Java Web Server
Administration Tool and recovering your login password (should you forget it).

To Access the Java Web Server Administration Tool:


1. Start the Java Web Server.
2. Connect to the Administration Tool by typing its URL.
For example, if the host name for your Java Web Server is comp and the
Administration Tool is on the default port, then you would enter the URL:
http://comp: 9090/index.html
3. Log in using the default user name admin and the default password admin
Once you install the Java Web Server and log in to the Administration Tool, it
is recommended that you change your default password and assign your
Administration Service to a new port (not 9090). This will provide additional
security for your Java Web Server. For details on performing these steps, see the
Properties document.
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.
If You Have Lost Your Password:
If you change your Administration password and then forget it and can no longer
access the Java Web Server Administration Tool, you can recover as follows:
1. Stop your Java Web Server.
2. In your favorite text editor, open the file
server_root/realms/data/adminRealm/keyfile
3. Change the admin line there so that it reads:

admin::YWRtaW4=
4. Save the file.
5. Restart your Java Web Server.
You should now be able to access the Administration Tool using admin as
the login and password.

SUPPORTED PLATFORMS
To use the Java Web Server, you need a server environment as well as a client
environment.
For the server environment:
You require a Java Development Kit (JDK) 1.1.7 or a JDK 1.1.7-compliant Java
Runtime Environment (JRE).
For the client environment:
You require a JDK 1.1-compatible browser to run the Java Web Server
administrative tools.
Note: Most recent browsers are JDK 1.1-compatible. Current versions of
Netscape Navigator (4.5) and Microsoft Internet Explorer (4.0) are known to be
compatible.
PREREQUISITES
Hardware and Operating System Prerequisites
Minimum
Intel 486-based PC
32 MB RAM
Windows 95 (with Winsock 2*) OR Windows NT 4.0
Windows Sockets 2 (WinSock 2)
Recommended
Intel Pentium 166 (or higher)-based PC
64 MB RAM
Windows NT 4.0 with Service Pack 4
The compressed file is approximately 8.5 MB.
To install it, you require roughly 13 MB of hard drive space.
Special Note for Windows 95 Users:
Windows 95 is supported as a development and demonstration platform
only. It is not supported as a server deployment platform.
Microsoft does not recommend the use of Windows 95 as a server
platform.

DEFAULTS
Installation Directory
By default, the product installs into
C:\JavaWebServer2.0\

(Windows example)

Java Runtime Environment (JRE)


Java Web Server 2.0 supports JDK 1.1.7 or JDK 1.1.7-compliant JREs. By
default, JRE 1.1.7 is automatically installed in the \jre directory. Where is the
directory containing the installed Java Web Server product.
For example
C:\JavaWebServer2.0\jre\
(Windows example)
Ports
The Java Web Server 2.0 installs its services on the following ports:
Web Service
8080
Secure Service
7070
These ports can be changed after installation using the Java Web Server
Administration Tool, the product documentation tells you how. The Administration
Tool is accessible on port 9090.

INSTALLATION on WINDOWS
1. Place the self-extracting file on your machine
Download the Java Web Server self-extracting file (.exe) from the Java
Web Server web site (or copy the self-extracting file from the CD) onto your
machine.
2. Extract installation files and launch setup
Double-click on the self-extracting file to extract the Java Web Server
temporary installation files into the directory and launch the Setup program.
3. Follow the setup program's instructions
Follow the instructions in the Setup program to install Java Web Server in a
directory location on your hard disk.
Installation into a directory path containing spaces, such as C:\Program
Files\ is not recommended as it may cause problems with environment variables
used by the Java Web Server.
By default, Setup installs Java Web Server in C:\JavaWebServer2.0
On Windows NT only:

4. Choose whether to install as an NT service


If you are installing on Windows NT, near the end of the installation program
you will be asked if you want to have the Java Web Server start automatically on
system reboot.
(That is, whether you want to install the Java Web Server as an NT Service).
Note: You must have NT Administrator privileges to choose this option.
If you click Yes:
An entry will be added to the Control Panels -> Services and the
JavaWebServer NT Service will be started up automatically every time you
restart your system.
If you click No:
No entry will be made in the Control Panel's Services panel.
5. At the end of the installation, click "View the README".
Java Web Server Servlet API Package javax.servlet
Interfaces
RequestDispatcher - Defines an object that receives requests from the client
and sends them to any resource (such as a servlet, HTML file, or JSP file) on the
server.
Servlet - Defines methods that all servlets must implement.
ServletConfig- Defines a servlet configuration object, which a servlet engine
uses to pass information to a servlet in order to initialize the servlet.
ServletContext- Defines a set of methods that a servlet uses to communicate
with a servlet engine, for example, to get the MIME type of a file, locate other
servlets running on the server, or write to a servlet log file.
ServletRequest- Defines an object that a servlet engine uses to give a servlet
information about a client request.
ServletResponse- Sends MIME-encoded data from the servlet to the client.
SingleThreadModel- Ensures that servlets handle only one request at a time.
Class Summary
GenericServlet- Defines a generic, protocol-independent servlet.
ServletInputStream- Provides an input stream for reading binary data from a
client request, including an efficient readLine method for reading data one line at
a time.
ServletOutputStream- Provides an output stream for sending binary data to the
client.

Exception Summary
ServletException- Defines a general exception a servlet throws when it
encounters difficulty.
UnavailableException Defines an exception that a servlet throws to indicate
that it is permanently or temporarily unavailable.
Package javax.servlet.http
Interface
HttpServletRequest-Extends the ServletRequest interface to provide additional
functionality for the request object that is passed to an HTTP servlet.
HttpServletResponse-Defines an HTTP servlet response that a servlet running
on a Web server sends to a client using HTTP.
HttpSession- Provides a way to identify a user across more than one page
request or visit to a Web site.
HttpSessionBindingListener-Causes an object to be notified when it is bound
to or unbound from a session.
Class Summary
Cookie-Creates a cookie, a small amount of information sent by a servlet to a
Web browser, saved by the browser, and later sent back to the server when the
client accesses the same Web page.
HttpServlet- Provides an abstract class that you can subclass to create an HTTP
servlet, which receives requests from and sends responses to a Web site.

You might also like