Here is the complete lab for creating and deploying a Number Guessing Game EJB application on the GlassFish server.
EJB Lab: Number Guessing Game
Objective
Develop and deploy a simple number guessing game as a Jakarta EE application using GlassFish. The application will prompt the user to guess a number, and the server will respond with "Higher," "Lower," or "Correct."
Step 1: Verify GlassFish Installation
Ensure the GlassFish server is installed and running:
cd /path/to/glassfish/bin
./asadmin start-domain
Open your browser and navigate to:
http://localhost:4848
Confirm the GlassFish admin console is accessible.
Step 2: Create the Maven Project
Open a Terminal:
Navigate to your projects directory:
mkdir NumberGuessingGame
cd NumberGuessingGame
Generate a Maven Project: Run the following Maven command to create the project structure: