A basic crud application example
Master
Develop
- Create the necessary database table on your favourite RDBMS (see script.sql)
- Download and change JDBC URL, username and password in org.systemexception.crudapplication.dao.EmployeeDaoImpl
- Compile and deploy to you favourite web container
READ CAREFULLY
Use glassfish-embedded-all
and comment out javaee-web-api
.
Use javaee-web-api
and comment out glassfish-embedded-all
.
Available servlets:
- BadWorld: just generates a bunch of random hex codes
- HelloWorld: pretty explicative
- InsertEmployee: create an employee
- RandomEmployee: reads a random employee
- ListEmployees: reads a table with all employees in the database
- EmployeesJson: reads the full employee list in a JSON
- UpdateEmployee: update employee record
- DeleteEmployee: delete an employee