In this chapter, we will explore the process of developing a client/server application that is primarily oriented around HTTP. This is an important protocol, and it serves as the primary communication medium for a multitude of applications. We will examine the protocol, the requirements placed on a client, and the requirements placed on a server for various versions of the protocol.
Specifically, we will:
Examine the nature of the HTTP protocol
Demonstrate how low-level sockets can support the protocol
Use the
HttpURLConnect
andHTTPServer
classes to create an HTTP serverExamine various open source Java HTTP servers
Investigate various configuration issues and how cookies are handled
HTTP servers are used extensively, so a good understanding of how Java supports them is important.