Chapter 3. Networking

We begin this chapter by reviewing basic networking concepts. We then move on to writing Java programs that connect to network services. We show you how to get information from a web server and how to send e-mail from a Java program. We conclude the chapter with a case study that combines an applet and a servlet to harvest information on the Internet.

In the first part of this chapter, we assume that you have no network programming experience. If you have written TCP/IP programs before and ports and sockets are no mystery to you, you should breeze through the sample code. Toward the end of this chapter, the code becomes ...

Get Core Java™ 2 Volume II - Advanced Features, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.