Java 实现 web服务器的简单实例
实例代码:
import java.util.*;
// Chapter 8, Listing 3
public class WebServerDemo {
// Directory of HTML pages and other files
protected String docroot;
// Port number of web server
protected int port;
// Socket for the web server
protected ServerSocket ss;
// Handler
1