- Create new project, add dependencies for postgres, servlet, javax.el, jstl, fileupload, jetty runner.
- Create Domains with varibales similar to tables in my db. Generate it's setters and getters.
- Create class Settings that contains Connection connection and has the settings for url: jdbc.., user, psw.
- Create Dao classes for entitys that has the CRUD methods, ex: method CreateStudent has the Connection connection intialization from Settings class. Declare the PreparedStatment preparedStatment = null; preparedStatment = Settings.getConnection().prepareStatement("sql..."); ... preparedStament.executeUpdate(); ... ResultSet rs (is used to get the query Array) = preparedStatment.executeQuery();
- Create Jsp pages
-
Create Servlet, initialize the Dao classes,
declare the doGet & and doPost methods, where:
doGet: Initialize List with data using Dao object, and request.setAttribute(list..)...
doPost: request.getParameterMap().get(...name...)...
andrewrotary / student-manager Goto Github PK
View Code? Open in Web Editor NEWj2ee project
Home Page: https://j2ee-practica.herokuapp.com/StudentController