-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 211d8ab
Showing
42 changed files
with
1,913 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src/main/java"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/javax.servlet.jsp.jstl-1.2.1.jar"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/javax.servlet.jsp.jstl-api-1.2.1.jar"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.23.jar"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/protobuf-java-3.11.4.jar"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v9.0"> | ||
<attributes> | ||
<attribute name="owner.project.facets" value="jst.web"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> | ||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> | ||
<classpathentry kind="output" path="build/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>Administrative-Portal</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.validation.validationbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="src/main/webapp"/> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject"> | ||
<attributes> | ||
<attribute name="hide" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/> | ||
<classpathentry kind="output" path=""/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 | ||
org.eclipse.jdt.core.compiler.compliance=11 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> | ||
<wb-module deploy-name="Administrative-Portal"> | ||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> | ||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> | ||
<property name="context-root" value="Administrative-Portal"/> | ||
<property name="java-output-path" value="/Administrative-Portal/build/classes"/> | ||
</wb-module> | ||
</project-modules> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<faceted-project> | ||
<runtime name="Apache Tomcat v9.0"/> | ||
<fixed facet="jst.web"/> | ||
<fixed facet="java"/> | ||
<fixed facet="wst.jsdt.web"/> | ||
<installed facet="java" version="11"/> | ||
<installed facet="jst.web" version="4.0"/> | ||
<installed facet="wst.jsdt.web" version="1.0"/> | ||
</faceted-project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Administrative-portal-for-Learner-s-Academy | ||
## Project' Details | ||
This project aims to design and develop a backend administrative portal for the Learner’s Academy using Java EE technologies. I developed it as a project of phase 2 for the Become a back-end expert course. | ||
The goal of this project is to apply servlet, jsp and JDBC concepts. | ||
|
||
## Product Backlog: | ||
1. Create database and tables. | ||
2. Connect the database to the project. | ||
3. Create models classes. | ||
4. Create a database utility class to retrieve data. | ||
5. Create login page. | ||
6. Create JSP files for all pages of the project. | ||
7. Create a servlet to get requests and send responses to the JSP files. | ||
8. Add cookies. | ||
9. Create a CSS file to format the contents. | ||
10. Debug and Test the project. | ||
|
||
## Technologies and tools Used | ||
• Servlet: to do the business logic and works a controller for the project. | ||
|
||
• JSP: to handle the presentation view. | ||
|
||
• SQL: to create and manage the database. | ||
|
||
• JDBC: to make operations on the database for the project. | ||
|
||
• CSS: to format the contents. | ||
|
||
• phpMyAdmin: to administrate and manage the database manually. | ||
|
||
• Eclipse: to write and run the code. | ||
|
||
• Tomcat: to run and deploy servlet application. | ||
|
||
## Flowcharts of The Application | ||
|
||
![Blank Diagram](https://user-images.githubusercontent.com/64940728/120771636-182e8e00-c528-11eb-92bb-f5856138c93f.png) | ||
|
||
|
||
## Core concepts used in the project. | ||
• Object-Oriented: used to create and model objects for users and their credentials. | ||
|
||
• Databases: used to store and retrieve data. | ||
|
||
• Data Sources: used to define a set of properties required to identify and access the database. | ||
|
||
• Collections: used some collections such arraylist to store collection of data. | ||
|
||
• Exception Handling: used to catch problems that arises in the code especially in I/O blocks. | ||
|
||
• Cookies: to store log-in data on the client browser. | ||
|
||
|
||
## How to run the program | ||
• clone project | ||
|
||
• Import the “database\database.sql” file to your database administration tool. | ||
|
||
• Go to “\src\main\webapp\META-INF\context.xml” file and open it. | ||
|
||
• Edit the database’ properties such as username, password and driverClassName to be suit to your database administration tool. | ||
|
||
• Now run program on a server. | ||
|
||
• To login you must enter admin for both username and password. | ||
|
||
Screenshots: | ||
|
||
![image](https://user-images.githubusercontent.com/64940728/120771774-47dd9600-c528-11eb-86c8-ee8a1b133a23.png) | ||
|
||
![image](https://user-images.githubusercontent.com/64940728/120771806-4e6c0d80-c528-11eb-97bb-8abe14d8560c.png) | ||
|
||
![image](https://user-images.githubusercontent.com/64940728/120771819-51ff9480-c528-11eb-98fe-39b7767b8de6.png) | ||
|
||
![image](https://user-images.githubusercontent.com/64940728/120771833-54fa8500-c528-11eb-9291-2ab6c81528f3.png) | ||
|
||
![image](https://user-images.githubusercontent.com/64940728/120771849-588e0c00-c528-11eb-89d0-fbc960d1562e.png) | ||
|
||
![image](https://user-images.githubusercontent.com/64940728/120771867-5c219300-c528-11eb-8aed-e8d137640817.png) | ||
|
||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
-- phpMyAdmin SQL Dump | ||
-- version 5.1.0 | ||
-- https://www.phpmyadmin.net/ | ||
-- | ||
-- Host: 127.0.0.1:3307 | ||
-- Generation Time: Jun 04, 2021 at 09:32 AM | ||
-- Server version: 10.4.18-MariaDB | ||
-- PHP Version: 8.0.3 | ||
|
||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; | ||
START TRANSACTION; | ||
SET time_zone = "+00:00"; | ||
|
||
|
||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
/*!40101 SET NAMES utf8mb4 */; | ||
|
||
-- | ||
-- Database: `administrative-portal` | ||
-- | ||
|
||
-- -------------------------------------------------------- | ||
|
||
-- | ||
-- Table structure for table `classes` | ||
-- | ||
|
||
CREATE TABLE `classes` ( | ||
`id` int(11) NOT NULL, | ||
`section` int(55) NOT NULL, | ||
`teacher` int(11) NOT NULL, | ||
`subject` int(11) NOT NULL, | ||
`time` varchar(44) NOT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
|
||
-- | ||
-- Dumping data for table `classes` | ||
-- | ||
|
||
INSERT INTO `classes` (`id`, `section`, `teacher`, `subject`, `time`) VALUES | ||
(1, 1, 1, 1, '9:00'), | ||
(2, 3, 2, 2, '11:30'); | ||
|
||
-- -------------------------------------------------------- | ||
|
||
-- | ||
-- Table structure for table `students` | ||
-- | ||
|
||
CREATE TABLE `students` ( | ||
`id` int(11) NOT NULL, | ||
`fname` varchar(55) NOT NULL, | ||
`lname` varchar(55) NOT NULL, | ||
`age` int(11) DEFAULT NULL, | ||
`class` int(11) NOT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
|
||
-- | ||
-- Dumping data for table `students` | ||
-- | ||
|
||
INSERT INTO `students` (`id`, `fname`, `lname`, `age`, `class`) VALUES | ||
(1, 'Ali', 'Ahsan', 21, 1), | ||
(2, 'Hassan', 'Ahmed', 23, 2), | ||
(4, 'Gazi', 'Dani', 21, 1), | ||
(5, 'Tony', 'Fadel', 18, 2), | ||
(6, 'Lami', 'Saro', 24, 1), | ||
(7, 'Yazen', 'Rawn', 24, 2); | ||
|
||
-- -------------------------------------------------------- | ||
|
||
-- | ||
-- Table structure for table `subjects` | ||
-- | ||
|
||
CREATE TABLE `subjects` ( | ||
`id` int(11) NOT NULL, | ||
`name` varchar(55) NOT NULL, | ||
`shortcut` varchar(50) NOT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
|
||
-- | ||
-- Dumping data for table `subjects` | ||
-- | ||
|
||
INSERT INTO `subjects` (`id`, `name`, `shortcut`) VALUES | ||
(1, 'English', 'ENG'), | ||
(2, 'Mathematics', 'MATH'); | ||
|
||
-- -------------------------------------------------------- | ||
|
||
-- | ||
-- Table structure for table `teachers` | ||
-- | ||
|
||
CREATE TABLE `teachers` ( | ||
`id` int(11) NOT NULL, | ||
`fname` varchar(55) NOT NULL, | ||
`lname` varchar(55) NOT NULL, | ||
`age` varchar(11) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | ||
|
||
-- | ||
-- Dumping data for table `teachers` | ||
-- | ||
|
||
INSERT INTO `teachers` (`id`, `fname`, `lname`, `age`) VALUES | ||
(1, 'Sami', 'Rashed', '55'), | ||
(2, 'Rami', 'Sari', '66'); | ||
|
||
-- | ||
-- Indexes for dumped tables | ||
-- | ||
|
||
-- | ||
-- Indexes for table `classes` | ||
-- | ||
ALTER TABLE `classes` | ||
ADD PRIMARY KEY (`id`), | ||
ADD KEY `subject_id` (`subject`), | ||
ADD KEY `teacher_id` (`teacher`); | ||
|
||
-- | ||
-- Indexes for table `students` | ||
-- | ||
ALTER TABLE `students` | ||
ADD PRIMARY KEY (`id`), | ||
ADD KEY `class_id` (`class`); | ||
|
||
-- | ||
-- Indexes for table `subjects` | ||
-- | ||
ALTER TABLE `subjects` | ||
ADD PRIMARY KEY (`id`); | ||
|
||
-- | ||
-- Indexes for table `teachers` | ||
-- | ||
ALTER TABLE `teachers` | ||
ADD PRIMARY KEY (`id`); | ||
|
||
-- | ||
-- AUTO_INCREMENT for dumped tables | ||
-- | ||
|
||
-- | ||
-- AUTO_INCREMENT for table `classes` | ||
-- | ||
ALTER TABLE `classes` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; | ||
|
||
-- | ||
-- AUTO_INCREMENT for table `students` | ||
-- | ||
ALTER TABLE `students` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; | ||
|
||
-- | ||
-- AUTO_INCREMENT for table `subjects` | ||
-- | ||
ALTER TABLE `subjects` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; | ||
|
||
-- | ||
-- AUTO_INCREMENT for table `teachers` | ||
-- | ||
ALTER TABLE `teachers` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; | ||
|
||
-- | ||
-- Constraints for dumped tables | ||
-- | ||
|
||
-- | ||
-- Constraints for table `classes` | ||
-- | ||
ALTER TABLE `classes` | ||
ADD CONSTRAINT `subject_id` FOREIGN KEY (`subject`) REFERENCES `subjects` (`id`), | ||
ADD CONSTRAINT `teacher_id` FOREIGN KEY (`teacher`) REFERENCES `teachers` (`id`); | ||
|
||
-- | ||
-- Constraints for table `students` | ||
-- | ||
ALTER TABLE `students` | ||
ADD CONSTRAINT `class_id` FOREIGN KEY (`class`) REFERENCES `classes` (`id`); | ||
COMMIT; | ||
|
||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
Oops, something went wrong.