Home : Course Map : Chapter 14 :
Web Servers and Java
JavaTech
Course Map
Chapter 14

Web Servers
Design of Server
ServerSocket
Threads For Clients
Client Streams
HTTP Protocol
Run Server
  Demo 1
Secure Server
  Demo 2
More Security
A client application
  Demo 3
Server Apps
Servlets
Exercises

     About JavaTech
     Codes List
     Exercises
     Feedback
     References
     Resources
     Tips
     Topic Index
     Course Guide
     What's New

A Web server is a program that runs continuously while waiting for and answering requests that it receives for Web pages and for other resources and services. A Web server refers primarily to a server that works with the Hypertext Transmission Protocol (HTTP). It will recognize the URL format in Web page requests.

A Web server can also run external programs via CGI (Common Gateway Interface) to process Web page form data or to carry out other tasks. These could be C programs, Perl scripts, etc.

Development of programs on the server side has become one of the most successful commercial areas for Java. It is used, for example, to create programs for database access, for shopping cart systems at online stores, etc. The Java 2 Enterprise Edition (J2EE) offers many tools for building server side software, or middleware as it is often called.

However, with the basic resources available in java.net in J2SE, you can also easily create small, specialized servers for your own purposes. We show in this chapter how to create a simple Web server using a socket based approach. In the Chapter 15 we create both a server and a specialized client to demonstrate how a client/server system could be used in a technical application.

Such simple servers can be quite useful. For example, in Chapter 24 we will show how to run a server in an embedded processor. Such a server could provide information, for example, about the state of a distant sensor or instrument.

In Chapters 16-20 we focus on RMI (Remote Method Invocation) clients and servers and other distributed computing techniques. In Chapter 21 we return to Web-based networking with a discussion of Web services.

We briefly discuss servlets, which are special kind of Java program run by a server, here and in Chapter 21. Like applets for browsers, servlets are specialized for running with a server.

References & Web Resources

Latest update: Dec. 9, 2004

  
  Part I Part II Part III
Java Core 1  2  3  4  5  6  7  8  9  10  11  12 13 14 15 16 17
18 19 20
21
22 23 24
Supplements

1  2  3  4  5  6  7  8  9  10  11  12

Tech 1  2  3  4  5  6  7  8  9  10  11  12
Physics 1  2  3  4  5  6  7  8  9  10  11  12

Java is a trademark of Sun Microsystems, Inc.