students = new ArrayList<>();
+
+ Connection myConn = null;
+ Statement myStmt = null;
+ ResultSet myRs = null;
+
+ try {
+
+ // get a connection
+ myConn = dataSource.getConnection();
+
+ // create sql stmt
+ String sql = "SELECT * FROM students WHERE class = " + classId;
+ myStmt = myConn.createStatement();
+
+ // execute query
+ myRs = myStmt.executeQuery(sql);
+
+ // process result
+ while (myRs.next()) {
+
+ // retrieve data from result set row
+ int id = myRs.getInt("id");
+ String firstName = myRs.getString("fname");
+ String lastName = myRs.getString("lname");
+ int age = myRs.getInt("age");
+ int aclass = myRs.getInt("class");
+
+ // create new student object
+ Student tempStudent = new Student(id, firstName, lastName, age, aclass);
+ students.add(tempStudent);
+
+ }
+
+ } catch (Exception e) {
+ // TODO: handle exception
+ } finally {
+ // close JDBC objects
+ close(myConn, myStmt, myRs);
+ }
+ return students;
+
+ }
+
+ private void close(Connection myConn, Statement myStmt, ResultSet myRs) {
+
+ try {
+ if (myRs != null) {
+ myRs.close();
+ }
+ if (myStmt != null) {
+ myStmt.close();
+ }
+ if (myConn != null) {
+ myConn.close();
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+}
diff --git a/src/main/java/com/simplilearn/admin/TestServlet.java b/src/main/java/com/simplilearn/admin/TestServlet.java
new file mode 100644
index 0000000..0ba061e
--- /dev/null
+++ b/src/main/java/com/simplilearn/admin/TestServlet.java
@@ -0,0 +1,88 @@
+package com.simplilearn.admin;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.Statement;
+
+import javax.annotation.Resource;
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.sql.DataSource;
+
+/**
+ * Servlet implementation class TestServlet
+ */
+@WebServlet("/TestServlet")
+public class TestServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ //Define datasource/connection pool for reference
+
+ @Resource(name="jdbc_database")
+ private DataSource dataSource;
+
+
+
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+
+
+ // Set the printwriter
+ PrintWriter out = response.getWriter();
+ response.setContentType("text/plain");
+
+ // establish connection to the DB
+ Connection myConn = null;
+ Statement myStmt = null;
+ ResultSet myRs = null;
+
+ try {
+
+ myConn = dataSource.getConnection();
+ //create a sql statement
+ String sql = "select * from students";
+ myStmt = myConn.createStatement();
+
+
+ //execute the sql statement
+ myRs = myStmt.executeQuery(sql);
+
+ //process the resultset
+ while(myRs.next()) {
+ String fname = myRs.getString("fname");
+ out.println(fname);
+
+ }
+
+
+
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+}
diff --git a/src/main/java/com/simplilearn/models/Class.java b/src/main/java/com/simplilearn/models/Class.java
new file mode 100644
index 0000000..a7ce715
--- /dev/null
+++ b/src/main/java/com/simplilearn/models/Class.java
@@ -0,0 +1,56 @@
+package com.simplilearn.models;
+
+public class Class {
+
+ private int id;
+ private int section;
+ private String teacher;
+ private String subject;
+ private String time;
+
+
+
+ public Class(int id, int section, String teacher, String subject, String time) {
+ super();
+ this.id = id;
+ this.section = section;
+ this.teacher = teacher;
+ this.subject = subject;
+ this.time = time;
+ }
+
+
+ public int getId() {
+ return id;
+ }
+ public void setId(int id) {
+ this.id = id;
+ }
+ public int getSection() {
+ return section;
+ }
+ public void setSection(int section) {
+ this.section = section;
+ }
+ public String getTeacher() {
+ return teacher;
+ }
+ public void setTeacher(String teacher) {
+ this.teacher = teacher;
+ }
+ public String getSubject() {
+ return subject;
+ }
+ public void setSubject(String subject) {
+ this.subject = subject;
+ }
+ public String getTime() {
+ return time;
+ }
+ public void setTime(String time) {
+ this.time = time;
+ }
+
+
+
+}
diff --git a/src/main/java/com/simplilearn/models/Student.java b/src/main/java/com/simplilearn/models/Student.java
new file mode 100644
index 0000000..ed40542
--- /dev/null
+++ b/src/main/java/com/simplilearn/models/Student.java
@@ -0,0 +1,64 @@
+package com.simplilearn.models;
+
+public class Student {
+
+ private int id;
+ private String fname;
+ private String lname;
+ private int age;
+ private int aclass;
+
+
+
+
+ public Student(int id, String fname, String lname, int age, int aclass) {
+ super();
+ this.id = id;
+ this.fname = fname;
+ this.lname = lname;
+ this.age = age;
+ this.aclass = aclass;
+ }
+
+
+ public int getId() {
+ return id;
+ }
+ public void setId(int id) {
+ this.id = id;
+ }
+ public String getFname() {
+ return fname;
+ }
+ public void setFname(String fname) {
+ this.fname = fname;
+ }
+ public String getLname() {
+ return lname;
+ }
+ public void setLname(String lname) {
+ this.lname = lname;
+ }
+ public int getAge() {
+ return age;
+ }
+ public void setAge(int age) {
+ this.age = age;
+ }
+ public int getAclass() {
+ return aclass;
+ }
+ public void setAclass(int aclass) {
+ this.aclass = aclass;
+ }
+
+
+ @Override
+ public String toString() {
+ return "Student [id=" + id + ", fname=" + fname + ", lname=" + lname + ", age=" + age + ", aclass=" + aclass
+ + "]";
+ }
+
+
+
+}
diff --git a/src/main/java/com/simplilearn/models/Subject.java b/src/main/java/com/simplilearn/models/Subject.java
new file mode 100644
index 0000000..1b41614
--- /dev/null
+++ b/src/main/java/com/simplilearn/models/Subject.java
@@ -0,0 +1,43 @@
+package com.simplilearn.models;
+
+public class Subject {
+
+ private int id;
+ private String name;
+ private String shortcut;
+
+ public Subject(int id, String name, String shortcut ) {
+ super();
+ this.id = id;
+ this.name = name;
+ this.shortcut = shortcut;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getShortcut() {
+ return shortcut;
+ }
+
+ public void setShortcut(String shortcut) {
+ this.shortcut = shortcut;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+
+
+}
diff --git a/src/main/java/com/simplilearn/models/Teacher.java b/src/main/java/com/simplilearn/models/Teacher.java
new file mode 100644
index 0000000..ecbaa44
--- /dev/null
+++ b/src/main/java/com/simplilearn/models/Teacher.java
@@ -0,0 +1,52 @@
+package com.simplilearn.models;
+
+public class Teacher {
+
+ private int id;
+ private String fname;
+ private String lname;
+ private int age;
+
+ public Teacher(int id, String fname, String lname, int age) {
+ super();
+ this.id = id;
+ this.fname = fname;
+ this.lname = lname;
+ this.age = age;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getFname() {
+ return fname;
+ }
+
+ public void setFname(String fname) {
+ this.fname = fname;
+ }
+
+ public String getLname() {
+ return lname;
+ }
+
+ public void setLname(String lname) {
+ this.lname = lname;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+
+
+}
diff --git a/src/main/webapp/META-INF/MANIFEST.MF b/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..254272e
--- /dev/null
+++ b/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/src/main/webapp/META-INF/context.xml b/src/main/webapp/META-INF/context.xml
new file mode 100644
index 0000000..0147a5a
--- /dev/null
+++ b/src/main/webapp/META-INF/context.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/lib/javax.servlet.jsp.jstl-1.2.1.jar b/src/main/webapp/WEB-INF/lib/javax.servlet.jsp.jstl-1.2.1.jar
new file mode 100644
index 0000000..a86a365
Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/javax.servlet.jsp.jstl-1.2.1.jar differ
diff --git a/src/main/webapp/WEB-INF/lib/javax.servlet.jsp.jstl-api-1.2.1.jar b/src/main/webapp/WEB-INF/lib/javax.servlet.jsp.jstl-api-1.2.1.jar
new file mode 100644
index 0000000..4b3b433
Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/javax.servlet.jsp.jstl-api-1.2.1.jar differ
diff --git a/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.23.jar b/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.23.jar
new file mode 100644
index 0000000..1e0cb19
Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.23.jar differ
diff --git a/src/main/webapp/WEB-INF/lib/protobuf-java-3.11.4.jar b/src/main/webapp/WEB-INF/lib/protobuf-java-3.11.4.jar
new file mode 100644
index 0000000..7224d23
Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/protobuf-java-3.11.4.jar differ
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..e50d190
--- /dev/null
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,10 @@
+
+
+ Administrative-Portal
+
+
+ AdminControllerServlet
+ index.jsp
+ index.html
+
+
\ No newline at end of file
diff --git a/src/main/webapp/class-students.jsp b/src/main/webapp/class-students.jsp
new file mode 100644
index 0000000..6c29839
--- /dev/null
+++ b/src/main/webapp/class-students.jsp
@@ -0,0 +1,57 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+
+
+
+
+
+Students of a Class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ First Name |
+ Last Name |
+ age |
+
+
+
+
+
+
+ ${tempStudent.fname} |
+ ${tempStudent.lname} |
+ ${tempStudent.age} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/classes-list.jsp b/src/main/webapp/classes-list.jsp
new file mode 100644
index 0000000..6df6466
--- /dev/null
+++ b/src/main/webapp/classes-list.jsp
@@ -0,0 +1,69 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+
+
+
+
+List of Classes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Section |
+ Subject |
+ Teacher |
+ Time |
+ List of Students |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${tempClass.section} |
+ ${tempClass.subject} |
+ ${tempClass.teacher} |
+ ${tempClass.time} |
+ List |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/css/add-student-style.css b/src/main/webapp/css/add-student-style.css
new file mode 100644
index 0000000..62fb41a
--- /dev/null
+++ b/src/main/webapp/css/add-student-style.css
@@ -0,0 +1,43 @@
+form {
+ margin-top: 10px;
+}
+
+label {
+ font-size: 16px;
+ width: 100px;
+ display: block;
+ text-align: right;
+ margin-right: 10px;
+ margin-top: 8px;
+ margin-bottom: 8px;
+}
+
+input {
+ width: 250px;
+ border: 1px solid #666;
+ border-radius: 5px;
+ padding: 4px;
+ font-size: 16px;
+}
+
+.save {
+ font-weight: bold;
+ width: 130px;
+ padding: 5px 10px;
+ margin-top: 30px;
+ background: #cccccc;
+}
+
+table {
+ border-style:none;
+ width:50%;
+}
+
+tr:nth-child(even) {background: #FFFFFF}
+tr:nth-child(odd) {background: #FFFFFF}
+
+tr {
+ border-style:none;
+ text-align:left;
+}
+
diff --git a/src/main/webapp/css/background.jpg b/src/main/webapp/css/background.jpg
new file mode 100644
index 0000000..604e7a5
Binary files /dev/null and b/src/main/webapp/css/background.jpg differ
diff --git a/src/main/webapp/css/login.css b/src/main/webapp/css/login.css
new file mode 100644
index 0000000..fa93cc9
--- /dev/null
+++ b/src/main/webapp/css/login.css
@@ -0,0 +1,42 @@
+Body {
+ font-family: Calibri, Helvetica, sans-serif;
+ background-color: pink;
+
+}
+button {
+ justify-content: center;
+ background-color: #4CAF50;
+ width: 100%;
+ color: white;
+ padding: 15px;
+ margin: 10px 0px;
+ border: none;
+ cursor: pointer;
+ }
+
+ form {
+ border: 1.4px solid black;
+ width: 45%;
+ margin: 0 auto;
+ }
+ input[type=text], input[type=password] {
+ justify-content: center;
+ width: 100%;
+ margin: 8px 0;
+ padding: 12px 20px;
+ display: inline-block;
+ border: 2px solid green;
+ box-sizing: border-box;
+ }
+ button:hover {
+ opacity: 0.7;
+ }
+
+
+
+ .container {
+
+ justify-content: center;
+ padding: 15px;
+ background-color: #FFF8DC;
+ }
\ No newline at end of file
diff --git a/src/main/webapp/css/style.css b/src/main/webapp/css/style.css
new file mode 100644
index 0000000..4c3a8d7
--- /dev/null
+++ b/src/main/webapp/css/style.css
@@ -0,0 +1,105 @@
+html, body{
+
+ padding:0px;
+ font-family:Verdana, Arial, Helvetica, sans-serif;
+ margin-left: 103px; /* Same as the width of the sidenav */
+}
+
+table {
+ border-collapse:collapse;
+ border:1px solid gray;
+ font-family: Tahoma,Verdana,Segoe,sans-serif;
+ width:72%;
+
+}
+
+th {
+ border-bottom:1px solid gray;
+ background:none repeat scroll 0 0 #0775d3;
+ padding:10px;
+ color: #FFFFFF;
+}
+
+tr {
+ border-top:1px solid gray;
+ text-align:center;
+}
+
+tr:nth-child(even) {background: #FFFFFF}
+tr:nth-child(odd) {background: #BBBBBB}
+
+#wrapper {width: 100%; text-align: center; }
+#header {width: 72%; background: #0775d3; margin-top: 0px; padding:5px 0px 15px 0px;}
+#header h3 {width: 100%; margin:auto; color: #FFFFFF;}
+#container {width: 100%; margin:auto}
+#container h3 {color: #000;}
+#container #content {margin-top: 20px;}
+
+.add-student-button {
+ border: 1px solid #666;
+ border-radius: 5px;
+ padding: 4px;
+ font-size: 12px;
+ font-weight: bold;
+ width: 120px;
+ padding: 5px 10px;
+
+ margin-bottom: 15px;
+ background: #cccccc;
+}
+
+
+
+.sidenav {
+ height: 100%;
+ width: 200px;
+ border-color: #FFFFFF;
+ position: fixed;
+ z-index: 1;
+ top: 0;
+ left: 0;
+ background-color: #000080;
+ overflow-x: hidden;
+ padding-top: 20px;
+}
+
+.sidenav a {
+ padding: 6px 6px 6px 32px;
+ text-decoration: none;
+ font-size: 25px;
+ color: white;
+ display: block;
+}
+
+.sidenav a:hover {
+ color: blue;
+}
+
+@media screen and (max-height: 450px) {
+ .sidenav {padding-top: 15px;}
+ .sidenav a {font-size: 18px;}
+}
+
+#page{
+
+ height: 100%;
+
+
+}
+
+
+#logo{
+ font-family: 'Trebuchet MS', sans-serif;
+ text-align: center;
+ color: white;
+
+}
+
+.bar-item{
+
+
+ border-color: #FFFFFF;
+ border-width: 3px;
+ border-bottom: .5px solid rgba(255, 255, 255, 0.247);
+
+}
\ No newline at end of file
diff --git a/src/main/webapp/left-list.jsp b/src/main/webapp/left-list.jsp
new file mode 100644
index 0000000..740ef8f
--- /dev/null
+++ b/src/main/webapp/left-list.jsp
@@ -0,0 +1,35 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+
+
+
diff --git a/src/main/webapp/list-students.jsp b/src/main/webapp/list-students.jsp
new file mode 100644
index 0000000..ca4c380
--- /dev/null
+++ b/src/main/webapp/list-students.jsp
@@ -0,0 +1,58 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+
+
+
+
+
+List of Students
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ First Name |
+ Last Name |
+ age |
+
+
+
+
+
+
+
+ ${tempStudent.fname} |
+ ${tempStudent.lname} |
+ ${tempStudent.age} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp
new file mode 100644
index 0000000..8a95a2d
--- /dev/null
+++ b/src/main/webapp/login.jsp
@@ -0,0 +1,33 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+
+
+
+
+
+Login
+
+
+
+
+ Admin Login
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/subjects-list.jsp b/src/main/webapp/subjects-list.jsp
new file mode 100644
index 0000000..e4f7cc7
--- /dev/null
+++ b/src/main/webapp/subjects-list.jsp
@@ -0,0 +1,54 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+
+
+
+
+List of Teachers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name |
+ Shortcut |
+
+
+
+
+
+
+
+ ${tempSubject.name} |
+ ${tempSubject.shortcut} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/teachers-list.jsp b/src/main/webapp/teachers-list.jsp
new file mode 100644
index 0000000..7434c8f
--- /dev/null
+++ b/src/main/webapp/teachers-list.jsp
@@ -0,0 +1,56 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+
+
+
+
+List of Teachers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ First Name |
+ Last Name |
+ age |
+
+
+
+
+
+
+ ${tempStudent.fname} |
+ ${tempStudent.lname} |
+ ${tempStudent.age} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file