This project is a simple browser application built with JavaFX. The primary goal of this project is to understand the fundamentals of client-server architecture using Java.
The application allows users to enter a URL, and it sends an HTTP GET request to the specified server. The server's response is then parsed and displayed in a WebView component. The project focuses on:
- HTTP Protocol: Understanding how HTTP requests and responses work.
- Socket Programming: Using Java's
Socket
class to establish a connection between the client (browser) and the server. - Web Content Rendering: Displaying HTML content using JavaFX's
WebView
.
- URL Parsing: The application parses the entered URL to extract the protocol, host, port, and path.
- HTTP GET Request: Sends a properly formatted HTTP GET request to the server.
- Response Handling: Handles server responses, including status codes, headers, and content.
- Redirection Support: Automatically handles HTTP redirections (3xx status codes).
- Content Rendering: Displays HTML content in a JavaFX WebView.
This project is primarily a learning exercise to understand:
- Client-Server Communication: How a client (browser) communicates with a server using HTTP.
- Socket Programming: How to create and manage sockets for network communication.
- HTTP Protocol: The structure of HTTP requests and responses.
- JavaFX: Using JavaFX for building a simple GUI application.
- Clone the repository.
- Run the JavaFX application.
- Enter a URL to see how the browser fetches and displays the page.
0.1.0
Copyright © 2025 Janinda Rukshan. All Rights Reserved.
This project is licensed under the MIT License
Thanks for checking it out!