This repository includes various exercises that focus on networking principles using Java. Each exercise explores different networking concepts and should be run within an Integrated Development Environment (IDE). Below are detailed instructions for each exercise:
Overview:
This exercise illustrates how to retrieve and display the contents from a specified URL.
Steps:
- Launch the
Exercise1class in your IDE. - The prompted URL will be the one in the code.
Verification:
Overview:
This exercise demonstrates how to retrieve and display the contents from a specified URL.
Steps:
- Launch the
Exercise2class in your IDE. - The file called "resultados.html" will be generated with the URL given.
Overview:
This exercise highlights client-server communication where the client sends a number to the server.
Steps:
- Launch the
Exercise3class in your IDE. - Enter a number when prompted.
- Simultaneously, launch the
WebSocketClientclass to manage the client-server communication.
Verification:
Overview:
This exercise extends client-server communication to handle mathematical expressions, including the use of π (pi).
Steps:
- Launch the
Exercise4class in your IDE. - Enter a number or a mathematical expression.
- Simultaneously, launch the
WebSocketClientclass to manage the client-server communication.
Verification:
Overview:
This exercise sets up a basic HTTP server to serve files and images.
Steps:
- Launch the
Exercise5class in your IDE. - Access the server via a web browser.
- Search for a file located in the
src/main/resourcesdirectory.
Verification:
- Open the Project: Import the project into your preferred IDE.
- Build the Project: Ensure that your project compiles without errors.
- Run the Classes: Follow the specific instructions for each exercise to run the relevant classes.
To generate Javadoc for this project, run the following Maven command in the root directory:
mvn javadoc:javadocThe generated documentation will be located in the apidocs directory.
Build:
This project was developed using Java 11 and Maven.
Author:
Hann Jang




