Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Java Web Server

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.


How It Works

  1. Creates a ServerSocket on port 8080.
  2. Waits for a client (browser) to connect.
  3. Accepts the connection.
  4. Sends an HTTP response containing HTML.

Sample Output

Console

🚀 Server started at http://localhost:8080

Browser

Server Icon

Technologies Used

  • Java
  • ServerSocket
  • Socket
  • OutputStream
  • HTTP

How to Run

  1. Compile the program.
javac WebServer.java
  1. Run the server.
java WebServer
  1. Open your browser and visit:
http://localhost:8080

About

Network sockets and handling HTTP requests.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages