Java Reference
In-Depth Information
Figure 1.7: Hello World
Now that the program has been demonstrated, it is time to take a look at what was neces-
sary to implement this program. Recipe 1.1 is shown in Listing 1.6.
Listing 1.6: Simple Web Server (SimpleWebServer.java)
package com.heatonresearch.httprecipes.ch1.recipe1;
import java.io.*;
import java.net.*;
public class SimpleWebServer
{
/*
* The server socket.
*/
private ServerSocket serverSocket;
/**
* Construct the web server to listen on the specified
* port.
*
Search WWH ::




Custom Search