A simple HTTP server built using Java's ServerSocket and Socket classes. It listens on port 8080 and responds with a basic HTML page showing the current server time.
- Creates a
ServerSocketon port 8080. - Waits for a client (browser) to connect.
- Accepts the connection.
- Sends an HTTP response containing HTML.
🚀 Server started at http://localhost:8080
- Java
- ServerSocket
- Socket
- OutputStream
- HTTP
- Compile the program.
javac WebServer.java- Run the server.
java WebServer- Open your browser and visit:
http://localhost:8080
