This repository includes JEE demos for Servlets, JSPs, JSFs, JAX-RS and EJBs.
- IDE: Opensource
Eclipse IDE
for JEE is recommended - JDK: Open JDK 1.8 (not JRE) to use
JavaEE/JakartaEE 8
recommended - JEE Server: Glassfish v5.1 supporting
JavaEE/JakartaEE 8
recommended
- Make sure you downloaded
Eclipse IDE for JEE Development
from here - Please refer here to setup Eclipse IDE
- Please refer here to setup a new
GlassFish Server
instance in Eclipse IDE - Download and install
OpenJDK 1.8
(if not available) from here
Each demo1,...demo5
folders are considered separate JEE projects for the IDE.
You can simply navigate into the demoN folder and execute the following;
For Linux / MacOSX;
cd demo1
./gradlew clean build
For Windows;
cd demo1
./gradlew.bat clean build
Below steps assume that you have already configured Gradle Tasks
view in Eclipse IDE as explained here
- Goto
Window -> Preferences
; Select Gradle and enter JDK1.8 path into your GradleJava Home
path. - Then from the tree hierarchy; select correct project(eg. demo1), expand
build
item,- Click on
clean
to run cleaning task, - Click on
build
to run build task
- Click on
NOTE: Whenever you are doing changes to the gradle file; make sure to right-click on the project and Gradle -> Refresh Gradle Project
Below steps assume that you have already configured server instance in Eclipse IDE as explained here.
- Right Click on
Server
instance we created. Then selectAdd and Remove...
.
- From the window; for example if you want to add
demo1
into JEE server; selectdemo1
first and clickAdd
button this will resultsdemo1
appear in the list of right side.
- Start the server by right click and selecting
Start
.
- Whenever doing changes, you can execute
clean build
gradle tasks(if required) then right click on the server and clickPublish
to publish the changes.