Application Layer Protocols

 < Free Open Study > 

In Chapter 1 we introduced the idea of a protocol stack, where protocols are layered according to the service they provide. We saw that the application layer provides specific services for specific types of application. These services are protocols such as Hypertext Transmission Protocol (HTTP), File Transfer Protocol (FTP), and Simple Message Transfer Protocol (SMTP). Using such an application layer protocol provides a level of abstraction from the transport layer that makes communication functionality in our applications easier to implement.

start sidebar

We only need concern ourselves with the application level - the other protocol layers are implemented by the underlying operating system.

end sidebar

We would substitute the HTTP protocol with SMTP for email applications, or FTP for file transfer applications. These run over the Transmission Control Protocol (TCP) layer. Other protocols such as file sharing (NFS) and Routing Information Protocols (RIP) use User Datagram Protocol (UDP). The Domain Name System runs over both UDP and TCP, according to the operation it is performing. The point is that once the underlying layers have provided a connection between computers we can specify additional protocols to enhance the communication at the application layer.

If we were to build a servlet-based web application we could also extend the existing generic API to provide an implementation for a particular protocol (for instance FTP), or we could write our own protocol and extend the API to use that. In either case we would add additional request methods, response codes and other information relevant to the application.

In most web server-client communication the applications use HTTP in the application layer, so it is not surprising that most servlets use an HTTP-based extension to the generic javax.servlet package. In this chapter, we will look more closely at the features of HTTP, and then we will discuss how we can implement servlets that handle HTTP requests and responses.

 < Free Open Study > 

Professional Java Servlets 2.3
Professional Java Servlets 2.3
ISBN: 186100561X
EAN: 2147483647
Year: 2006
Pages: 130

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: