diff --git a/Adv_Java_Project_Final/build.xml b/Adv_Java_Project_Final/build.xml new file mode 100644 index 0000000..64d6098 --- /dev/null +++ b/Adv_Java_Project_Final/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project DEMO. + + + diff --git a/Adv_Java_Project_Final/build/web/JS/Script1.js b/Adv_Java_Project_Final/build/web/JS/Script1.js new file mode 100644 index 0000000..a3ad891 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/JS/Script1.js @@ -0,0 +1,3 @@ + /* global script */ + + diff --git a/Adv_Java_Project_Final/build/web/META-INF/MANIFEST.MF b/Adv_Java_Project_Final/build/web/META-INF/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/Adv_Java_Project_Final/build/web/META-INF/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/Adv_Java_Project_Final/build/web/META-INF/context.xml b/Adv_Java_Project_Final/build/web/META-INF/context.xml new file mode 100644 index 0000000..19dfe5c --- /dev/null +++ b/Adv_Java_Project_Final/build/web/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/Adv_Java_Project_Final/build/web/Styles/style1.css b/Adv_Java_Project_Final/build/web/Styles/style1.css new file mode 100644 index 0000000..8f43177 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/Styles/style1.css @@ -0,0 +1,136 @@ + body + { + /*display: flex;*/ + justify-content: center; + background-image: url('BG1.jpg'); + } + + #page + { + border: 2px red; + display: flex; + justify-content: center; + + + } + .main + { + text-align: center; + align-self: center; + border: 2px solid black; + padding-bottom: 20px; + background-color: antiquewhite; + /*background-color: rgb(153,95,185);*/ + /* padding-left: -100px; + padding-right: -100px;*/ + border-radius: 10px; + box-shadow: 5px 5px 5px black; + } + + table + { + align-self: center; + margin: auto; + + + } + .had + { + + text-decoration: underline; + font-size: 25; + } + .tablebox + + { + padding-left: 40px; + padding-right: 40px; + + } + .button-17 { + margin-top: 20px; + align-items: center; + appearance: none; + background-color: burlywood ; + border-radius: 24px; + border-style: none; + box-shadow: rgba(0, 0, 0, .2) 0 3px 5px -1px,rgba(0, 0, 0, .14) 0 6px 10px 0,rgba(0, 0, 0, .12) 0 1px 18px 0; + box-sizing: border-box; + color: #3c4043; + cursor: pointer; + display: inline-flex; + fill: currentcolor; + font-family: "Google Sans",Roboto,Arial,sans-serif; + font-size: 14px; + font-weight: 500; + height: 48px; + justify-content: center; + letter-spacing: .25px; + line-height: normal; + max-width: 100%; + overflow: visible; + padding: 2px 24px; + position: relative; + text-align: center; + text-transform: none; + transition: box-shadow 280ms cubic-bezier(.4, 0, .2, 1),opacity 15ms linear 30ms,transform 270ms cubic-bezier(0, 0, .2, 1) 0ms; + user-select: none; + -webkit-user-select: none; + touch-action: manipulation; + width: auto; + will-change: transform,opacity; + z-index: 0; + } + + .button-17:hover { + background: #F6F9FE; + color: #174ea6; + } + + .button-17:active { + box-shadow: 0 4px 4px 0 rgb(60 64 67 / 30%), 0 8px 12px 6px rgb(60 64 67 / 15%); + outline: none; + } + + .button-17:focus { + outline: none; + border: 2px solid #4285f4; + } + + .button-17:not(:disabled) { + box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px; + } + + .button-17:not(:disabled):hover { + box-shadow: rgba(60, 64, 67, .3) 0 2px 3px 0, rgba(60, 64, 67, .15) 0 6px 10px 4px; + } + + .button-17:not(:disabled):focus { + box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px; + } + + .button-17:not(:disabled):active { + box-shadow: rgba(60, 64, 67, .3) 0 4px 4px 0, rgba(60, 64, 67, .15) 0 8px 12px 6px; + } + + .button-17:disabled { + box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px; + } + + #buttonup + { + border: 2px solid black; + border-radius: 8px; + background-color: burlywood; + + } + table + { + text-align: center; + + } + td + { + text-transform: capitalize; + } + \ No newline at end of file diff --git a/Adv_Java_Project_Final/build/web/Styles/style2.css b/Adv_Java_Project_Final/build/web/Styles/style2.css new file mode 100644 index 0000000..99a9f25 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/Styles/style2.css @@ -0,0 +1,143 @@ + + @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap'); + *{ + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'Poppins',sans-serif; + } + + body{ + height: 110vh; + display: flex; + justify-content: center; + align-items: center; + padding: auto; + margin: auto; + /*background: linear-gradient(135deg, #71b7e6, #9b59b6);*/ + background: burlywood; + } + #nav{ + + display: flex; + } + .container{ + max-width: 700px; + width: 100%; + background-color: antiquewhite; + padding: 25px 30px; + margin: 250px 30px; + border-radius: 5px; + box-shadow: 0 5px 10px rgba(0,0,0,0.5); + } + .container .title{ + font-size: 25px; + font-weight: 500; + position: relative; + } + .container .title::before{ + content: ""; + position: absolute; + left: 0; + bottom: 0; + height: 3px; + width: 30px; + border-radius: 5px; + background: linear-gradient(135deg, #71b7e6, #9b59b6); + } + .content form .user-details{ + display: flex; + flex-wrap: wrap; + justify-content: space-between; + margin: 20px 0 12px 0; + } + form .user-details .input-box{ + margin-bottom: 15px; + width: calc(100% / 2 - 20px); + } + form .input-box span.details{ + display: block; + font-weight: 500; + margin-bottom: 5px; + } + .user-details .input-box input{ + height: 45px; + width: 100%; + outline: none; + font-size: 16px; + border-radius: 5px; + padding-left: 15px; + border: 1px solid #ccc; + border-bottom-width: 2px; + transition: all 0.3s ease; + } + .user-details .input-box input:focus, + .user-details .input-box input:valid{ + border-color: #9b59b6; + } + + form .category label .dot{ + height: 18px; + width: 18px; + border-radius: 50%; + margin-right: 10px; + background: #d9d9d9; + border: 5px solid transparent; + transition: all 0.3s ease; + } + #dot-1:checked ~ .category label .one, + #dot-2:checked ~ .category label .two, + #dot-3:checked ~ .category label .three{ + background: #9b59b6; + border-color: #d9d9d9; + } + form input[type="radio"]{ + display: none; + } + form .button{ + height: 45px; + margin: 35px 0 + } + form .button input{ + height: 100%; + width: 100%; + border-radius: 5px; + border: none; + color: #fff; + font-size: 18px; + font-weight: 500; + letter-spacing: 1px; + cursor: pointer; + transition: all 0.3s ease; + background: linear-gradient(135deg, #71b7e6, #9b59b6); + } + form .button input:hover{ + /* transform: scale(0.99); */ + background: linear-gradient(-135deg, #71b7e6, #9b59b6); + } + @media(max-width: 584px){ + .container{ + max-width: 100%; + } + form .user-details .input-box{ + margin-bottom: 15px; + width: 100%; + } + form .category{ + width: 100%; + } + .content form .user-details{ + max-height: 300px; + overflow-y: scroll; + } + .user-details::-webkit-scrollbar{ + width: 5px; + } + } + @media(max-width: 459px){ + .container .content .category{ + flex-direction: column; + } + } + + \ No newline at end of file diff --git a/Adv_Java_Project_Final/build/web/Styles/style3.css b/Adv_Java_Project_Final/build/web/Styles/style3.css new file mode 100644 index 0000000..99f9e43 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/Styles/style3.css @@ -0,0 +1,50 @@ +*{ + + box-sizing: border-box; + /*font-family: 'Poppins',sans-serif;*/ + } + + body + { + background-color: bisque; + /*background: linear-gradient(135deg, #71b7e6, #9b59b6);*/ + color: black; + + height: 100vh; + /*display: flex;*/ + /*justify-content: center;*/ + /*align-items: center;*/ + /*padding: 10px;*/ + background:bisque; + } + #buttonup + { + border: 2px solid black; + border-radius: 8px; + background-color: burlywood; + margin-right: 5px; + + } + #para + { + color: black; + background-color:blanchedalmond; + margin: 30px 30px 30px ; + } + .para + { + + margin: 30px 30px 30px ; + } + #divH + { + + text-align: center; + + } + #hading + { + text-decoration: underline; + + } + \ No newline at end of file diff --git a/Adv_Java_Project_Final/build/web/Styles/style4.css b/Adv_Java_Project_Final/build/web/Styles/style4.css new file mode 100644 index 0000000..a0683db --- /dev/null +++ b/Adv_Java_Project_Final/build/web/Styles/style4.css @@ -0,0 +1,59 @@ + +*{ +/* margin: 0; + padding: 0;*/ + box-sizing: border-box; + font-family: 'Poppins',sans-serif; + } + +body + { + height: 100vh; + /*display: flex;*/ + justify-content: center; + /*align-items: center;*/ + padding: 10px; + background: bisque; +/*background-color: bisque;*/ + } + #nav + { + color: #3c4043; + justify-content: center; + align-self: center; + margin: auto; + + } + .hadding + { + color: black; + text-decoration: underline; + align-items: center; + justify-content: center; + display: block; + + } + nav{ + margin-top: 40px; + justify-content: center; + display: flex; + + } + #para + { + color: black; + margin: 30px 30px 30px ; + background: antiquewhite; + } + #buttonup + { + border: 2px solid black; + border-radius: 8px; + background-color: burlywood; + margin-right: 5px; + + } +/* #nav{ +align-items: center; +align-self: center; + }*/ diff --git a/Adv_Java_Project_Final/build/web/User_home.jsp b/Adv_Java_Project_Final/build/web/User_home.jsp new file mode 100644 index 0000000..ce3e305 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/User_home.jsp @@ -0,0 +1,52 @@ + + + + + + + + + <% + String fname = (String) session.getAttribute("fname"); + %> +
+

Advance Java Assignment

+
+
+
+
+
+ + + +
+
+
+
+ +
+

Welcome,<%=fname %>

+
+
+ Welcome to the Java Web Application, This application performed all crud operation and have also have functionality of session management with customized web View. + +
+ + +
+
+
 
+
+
+ + + + + + + diff --git a/Adv_Java_Project_Final/build/web/WEB-INF/classes/.netbeans_automatic_build b/Adv_Java_Project_Final/build/web/WEB-INF/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Adv_Java_Project_Final/build/web/WEB-INF/classes/.netbeans_update_resources b/Adv_Java_Project_Final/build/web/WEB-INF/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Adv_Java_Project_Final/build/web/WEB-INF/classes/Filters/filter1.class b/Adv_Java_Project_Final/build/web/WEB-INF/classes/Filters/filter1.class new file mode 100644 index 0000000..68cbeba Binary files /dev/null and b/Adv_Java_Project_Final/build/web/WEB-INF/classes/Filters/filter1.class differ diff --git a/Adv_Java_Project_Final/build/web/WEB-INF/classes/delete.class b/Adv_Java_Project_Final/build/web/WEB-INF/classes/delete.class new file mode 100644 index 0000000..6624dc2 Binary files /dev/null and b/Adv_Java_Project_Final/build/web/WEB-INF/classes/delete.class differ diff --git a/Adv_Java_Project_Final/build/web/WEB-INF/classes/login_db.class b/Adv_Java_Project_Final/build/web/WEB-INF/classes/login_db.class new file mode 100644 index 0000000..e9abe52 Binary files /dev/null and b/Adv_Java_Project_Final/build/web/WEB-INF/classes/login_db.class differ diff --git a/Adv_Java_Project_Final/build/web/WEB-INF/classes/register_db.class b/Adv_Java_Project_Final/build/web/WEB-INF/classes/register_db.class new file mode 100644 index 0000000..0a49bf7 Binary files /dev/null and b/Adv_Java_Project_Final/build/web/WEB-INF/classes/register_db.class differ diff --git a/Adv_Java_Project_Final/build/web/WEB-INF/classes/update.class b/Adv_Java_Project_Final/build/web/WEB-INF/classes/update.class new file mode 100644 index 0000000..7dd8bc1 Binary files /dev/null and b/Adv_Java_Project_Final/build/web/WEB-INF/classes/update.class differ diff --git a/Adv_Java_Project_Final/build/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar b/Adv_Java_Project_Final/build/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar new file mode 100644 index 0000000..1f90414 Binary files /dev/null and b/Adv_Java_Project_Final/build/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar differ diff --git a/Adv_Java_Project_Final/build/web/WEB-INF/web.xml b/Adv_Java_Project_Final/build/web/WEB-INF/web.xml new file mode 100644 index 0000000..9df9fc4 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/WEB-INF/web.xml @@ -0,0 +1,55 @@ + + + + register_db + register_db + + + login_db + login_db + + + update + update + + + delete + delete + + + register_db + /register_db + + + login_db + /login_db + + + update + /update + + + delete + /delete + + + + 30 + + + + + f1 + Filters.filter1 + + + f1 + /User_home.jsp + /search_user.html + /search_user.jsp + /showdata.jsp + /delete.jsp + /update.html + /logout.jsp + + diff --git a/Adv_Java_Project_Final/build/web/delete.jsp b/Adv_Java_Project_Final/build/web/delete.jsp new file mode 100644 index 0000000..c5fee70 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/delete.jsp @@ -0,0 +1,59 @@ + + + + + + + + + + + + +
+
Delete User
+
+
+
+
+ Email + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + diff --git a/Adv_Java_Project_Final/build/web/index.jsp b/Adv_Java_Project_Final/build/web/index.jsp new file mode 100644 index 0000000..eb9b7e6 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/index.jsp @@ -0,0 +1,39 @@ + + + + + + + INDEX + + + + + + +

Advance Java Assignment

+ +
+ +

What is CRUD?

+

CRUD Meaning :

CRUD is an acronym that comes from the world of computer programming and refers to the four functions that are considered necessary to implement a persistent storage application: create, read, update and delete. Persistent storage refers to any data storage device that retains power after the device is powered off, such as a hard disk or a solid-state drive. In contrast, random access memory and internal caching are two examples of volatile memory - they contain data that will be erased when they lose power. + + Explaining CRUD Operations + Organizations that keep track of customer data, accounts, payment information, health data, and other records require data storage hardware and applications that provide persistent storage. This data is typically organized into a database, which is simply an organized collection of data that may be viewed electronically. There are many types of databases: hierarchical databases, graph databases, and object-oriented databases to name a few. The most commonly implemented type of database is a relational database, which consists of data tabled in rows and columns and connected to other tables with complementary information by a system of keywords that includes primary keys and foreign keys. + + + +
+ + + + diff --git a/Adv_Java_Project_Final/build/web/login.jsp b/Adv_Java_Project_Final/build/web/login.jsp new file mode 100644 index 0000000..206d2f8 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/login.jsp @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + +
+ + +
Login
+
+ +
+
+
+ Email + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + diff --git a/Adv_Java_Project_Final/build/web/logout.jsp b/Adv_Java_Project_Final/build/web/logout.jsp new file mode 100644 index 0000000..65d7444 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/logout.jsp @@ -0,0 +1,7 @@ +<% + session.invalidate(); +response.setHeader("Cache-Control","no-cache,no-store"); +response.sendRedirect("index.html"); + + +%> diff --git a/Adv_Java_Project_Final/build/web/register.html b/Adv_Java_Project_Final/build/web/register.html new file mode 100644 index 0000000..4648a08 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/register.html @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + +
+
Registration
+
+
+
+
+ First Name + +
+
+ Last Name + +
+
+ Email + +
+
+ Address + +
+
+ City + +
+
+ State + +
+
+ Country + +
+
+ Zip + +
+
+ Phone + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + diff --git a/Adv_Java_Project_Final/build/web/search_user.html b/Adv_Java_Project_Final/build/web/search_user.html new file mode 100644 index 0000000..c2d2a36 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/search_user.html @@ -0,0 +1,58 @@ + + + + + + + + + + + +
+
Find User
+
+
+
+
+ Email + +
+
+ First Name + +
+
+
+ +
+
+
+
+ + + diff --git a/Adv_Java_Project_Final/build/web/search_user.jsp b/Adv_Java_Project_Final/build/web/search_user.jsp new file mode 100644 index 0000000..8425a13 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/search_user.jsp @@ -0,0 +1,81 @@ +<%@page import="java.sql.*"%> +<%@include file="User_home.jsp" %> + + + + + + +
+ +
+
+

List

+
+ + <% + String e1 = request.getParameter("email"); + String f1 = request.getParameter("fname"); + + try { + Class.forName("com.mysql.jdbc.Driver"); + // Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/assignment_db","root","root"); + // Class.forName("com.mysql.cj.jdbc.Driver"); + String db_ur1 = "jdbc:mysql://localhost:3306/assignment_db"; + String db_uname = "root"; + String db_upass = "root"; + Connection con = DriverManager.getConnection(db_ur1, db_uname, db_upass); + Statement st = con.createStatement(); + + ResultSet rs = st.executeQuery("select * from usere where email = '" + e1 + "' and fname = '" + f1 + "'"); + %> + + + + + + + + + + + + + + + + + <% while (rs.next()) { %> + + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + + + + <% + + } + con.close(); + %> +
First Name Last Name Address City Zip State Country Zip Phone
" + rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3) + " " + rs.getString(4) + " " + rs.getString(5) + " " + rs.getString(6) + " " + rs.getString(7) + " " + rs.getString(8) + " " + rs.getString(9) + "
+ + <% + } catch (Exception e2) { + System.out.println(e2); + + } + %> + +
+
+
+
+ + diff --git a/Adv_Java_Project_Final/build/web/showdata.jsp b/Adv_Java_Project_Final/build/web/showdata.jsp new file mode 100644 index 0000000..6e45921 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/showdata.jsp @@ -0,0 +1,89 @@ +<%@page import="java.sql.*"%> + +<%@include file="User_home.jsp" %> + + + + + + +
+ +
+
+

List

+
+ + + <% + + try { + Class.forName("com.mysql.jdbc.Driver"); + + String db_ur1 = "jdbc:mysql://localhost:3306/assignment_db"; + String db_uname = "root"; + String db_upass = "root"; + Connection con = DriverManager.getConnection(db_ur1, db_uname, db_upass); + Statement st = con.createStatement(); + + ResultSet rs = st.executeQuery("select * from usere"); + %> + + + + + + + + + + + + + + + + + + + + + <% while (rs.next()) { %> + + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + + + + + + + + + <% + + } + con.close(); + %> +
First Name Last Name Email City Zip State Country Zip Phone Update Delete
" + rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3) + " " + rs.getString(4) + " " + rs.getString(5) + " " + rs.getString(6) + " " + rs.getString(7) + " " + rs.getString(8) + " " + rs.getString(9) + "
+ + <% + } catch (Exception e1) { + System.out.println(e1); + + } + %> + +
+
+
+
+ + diff --git a/Adv_Java_Project_Final/build/web/update.html b/Adv_Java_Project_Final/build/web/update.html new file mode 100644 index 0000000..79b50f2 --- /dev/null +++ b/Adv_Java_Project_Final/build/web/update.html @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + +
+
Update
+
+
+
+
+ First Name + +
+
+ Last Name + +
+
+ Email + +
+
+ Address + +
+
+ City + +
+
+ State + +
+
+ Country + +
+
+ Zip + +
+
+ Phone + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + + + + + + diff --git a/Adv_Java_Project_Final/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar b/Adv_Java_Project_Final/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar new file mode 100644 index 0000000..1258902 Binary files /dev/null and b/Adv_Java_Project_Final/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar differ diff --git a/Adv_Java_Project_Final/lib/MySQLDriver/mysql-connector-java-5.1.23-bin.jar b/Adv_Java_Project_Final/lib/MySQLDriver/mysql-connector-java-5.1.23-bin.jar new file mode 100644 index 0000000..1f90414 Binary files /dev/null and b/Adv_Java_Project_Final/lib/MySQLDriver/mysql-connector-java-5.1.23-bin.jar differ diff --git a/Adv_Java_Project_Final/lib/javaee-endorsed-api-7.0/javaee-endorsed-api-7.0.jar.zip b/Adv_Java_Project_Final/lib/javaee-endorsed-api-7.0/javaee-endorsed-api-7.0.jar.zip new file mode 100644 index 0000000..0f3e50a Binary files /dev/null and b/Adv_Java_Project_Final/lib/javaee-endorsed-api-7.0/javaee-endorsed-api-7.0.jar.zip differ diff --git a/Adv_Java_Project_Final/lib/nblibraries.properties b/Adv_Java_Project_Final/lib/nblibraries.properties new file mode 100644 index 0000000..fa13c93 --- /dev/null +++ b/Adv_Java_Project_Final/lib/nblibraries.properties @@ -0,0 +1,10 @@ +libs.CopyLibs.classpath=\ + ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar +libs.CopyLibs.displayName=CopyLibs Task +libs.CopyLibs.prop-version=2.0 +libs.javaee-endorsed-api-7.0.classpath=\ + ${base}/javaee-endorsed-api-7.0/javaee-endorsed-api-7.0.jar.zip +libs.MySQLDriver.classpath=\ + ${base}/MySQLDriver/mysql-connector-java-5.1.23-bin.jar +libs.MySQLDriver.displayName=MySQL JDBC Driver +libs.MySQLDriver.prop-maven-dependencies=mysql:mysql-connector-java:5.1.23:jar diff --git a/Adv_Java_Project_Final/nbproject/ant-deploy.xml b/Adv_Java_Project_Final/nbproject/ant-deploy.xml new file mode 100644 index 0000000..55566c8 --- /dev/null +++ b/Adv_Java_Project_Final/nbproject/ant-deploy.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Adv_Java_Project_Final/nbproject/build-impl.xml b/Adv_Java_Project_Final/nbproject/build-impl.xml new file mode 100644 index 0000000..7e4ad94 --- /dev/null +++ b/Adv_Java_Project_Final/nbproject/build-impl.xml @@ -0,0 +1,1469 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The libs.CopyLibs.classpath property is not set up. +This property must point to +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part +of NetBeans IDE installation and is usually located at +<netbeans_installation>/java<version>/ant/extra folder. +Either open the project in the IDE and make sure CopyLibs library +exists or setup the property manually. For example like this: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Adv_Java_Project_Final/nbproject/genfiles.properties b/Adv_Java_Project_Final/nbproject/genfiles.properties new file mode 100644 index 0000000..b32a851 --- /dev/null +++ b/Adv_Java_Project_Final/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=cf1c38a5 +build.xml.script.CRC32=90108d3d +build.xml.stylesheet.CRC32=651128d4@1.77.1.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=cf1c38a5 +nbproject/build-impl.xml.script.CRC32=edee8d47 +nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1 diff --git a/Adv_Java_Project_Final/nbproject/private/private.properties b/Adv_Java_Project_Final/nbproject/private/private.properties new file mode 100644 index 0000000..11bcc63 --- /dev/null +++ b/Adv_Java_Project_Final/nbproject/private/private.properties @@ -0,0 +1,5 @@ +deploy.ant.properties.file=C:\\Users\\HP\\AppData\\Roaming\\NetBeans\\8.2\\tomcat90.properties +j2ee.server.home=C:/Program Files/Apache Software Foundation/Tomcat 9.0 +j2ee.server.instance=tomcat90:home=C:\\Program Files\\Apache Software Foundation\\Tomcat 9.0 +selected.browser=Chrome +user.properties.file=C:\\Users\\HP\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/Adv_Java_Project_Final/nbproject/private/private.xml b/Adv_Java_Project_Final/nbproject/private/private.xml new file mode 100644 index 0000000..88b1ccc --- /dev/null +++ b/Adv_Java_Project_Final/nbproject/private/private.xml @@ -0,0 +1,31 @@ + + + + + + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/Styles/style2.css + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/delete.html + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/src/java/login_db.java + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/login.html + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/Styles/style4.css + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/showdata.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/src/java/update.java + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/Styles/style1.css + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/META-INF/context.xml + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/Styles/style3.css + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/register.html + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/search_user.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/search_user.html + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/WEB-INF/web.xml + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/update.html + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/register.html + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/src/java/register_db.java + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/User_home.html + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/login.html + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/JS/Script1.js + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/src/java/delete.java + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/index.html + file:/C:/Users/HP/Documents/NetBeansProjects/DEMO/web/logout.jsp + + + diff --git a/Adv_Java_Project_Final/nbproject/project.properties b/Adv_Java_Project_Final/nbproject/project.properties new file mode 100644 index 0000000..fad5e71 --- /dev/null +++ b/Adv_Java_Project_Final/nbproject/project.properties @@ -0,0 +1,85 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +conf.dir=${source.root}/conf +debug.classpath=${build.classes.dir}:${javac.classpath} +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +# Files to be excluded from distribution war +dist.archive.excludes= +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +endorsed.classpath=\ + ${libs.javaee-endorsed-api-7.0.classpath} +excludes= +includes=** +j2ee.compile.on.save=true +j2ee.copy.static.files.on.save=true +j2ee.deploy.on.save=true +j2ee.platform=1.7-web +j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-ssi.jar:${j2ee.server.home}/lib/catalina-storeconfig.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-4.20.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jaspic-api.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-cs.jar:${j2ee.server.home}/lib/tomcat-i18n-de.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-i18n-ko.jar:${j2ee.server.home}/lib/tomcat-i18n-pt-BR.jar:${j2ee.server.home}/lib/tomcat-i18n-ru.jar:${j2ee.server.home}/lib/tomcat-i18n-zh-CN.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-jni.jar:${j2ee.server.home}/lib/tomcat-util-scan.jar:${j2ee.server.home}/lib/tomcat-util.jar:${j2ee.server.home}/lib/tomcat-websocket.jar:${j2ee.server.home}/lib/websocket-api.jar +j2ee.server.type=Tomcat +jar.compress=false +javac.classpath=\ + ${libs.MySQLDriver.classpath} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +lib.dir=${web.docbase.dir}/WEB-INF/lib +no.dependencies=false +persistence.xml.dir=${conf.dir} +platform.active=default_platform +resource.dir=setup +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running a class with a main method or a unit test +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.encoding=UTF-8 +source.root=src +src.dir=${source.root}/java +test.src.dir=test +war.content.additional= +war.ear.name=${war.name} +war.name=DEMO.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/Adv_Java_Project_Final/nbproject/project.xml b/Adv_Java_Project_Final/nbproject/project.xml new file mode 100644 index 0000000..3447a5c --- /dev/null +++ b/Adv_Java_Project_Final/nbproject/project.xml @@ -0,0 +1,26 @@ + + + org.netbeans.modules.web.project + + + DEMO + 1.6.5 + + + ${libs.MySQLDriver.classpath} + WEB-INF/lib + + + + + + + + + + + + .\lib\nblibraries.properties + + + diff --git a/Adv_Java_Project_Final/src/conf/MANIFEST.MF b/Adv_Java_Project_Final/src/conf/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/Adv_Java_Project_Final/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/Adv_Java_Project_Final/src/java/Filters/filter1.java b/Adv_Java_Project_Final/src/java/Filters/filter1.java new file mode 100644 index 0000000..7645252 --- /dev/null +++ b/Adv_Java_Project_Final/src/java/Filters/filter1.java @@ -0,0 +1,41 @@ +package Filters; +import java.io.IOException; +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.annotation.WebFilter; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +@WebFilter("/admin/*") +public class filter1 implements Filter { + + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) + throws IOException, ServletException { + + HttpServletRequest httpRequest = (HttpServletRequest) request; + HttpSession s = httpRequest.getSession(); + + String user = (String)s.getAttribute("fname"); + + if (user!=null) + { + chain.doFilter(request, response); + } + else + { + response.setContentType("text/html"); + response.getWriter().println("

Please Login First....

"); + } + } + + public void destroy() { + } + + public void init(FilterConfig fConfig) throws ServletException { + } + +} \ No newline at end of file diff --git a/Adv_Java_Project_Final/src/java/delete.java b/Adv_Java_Project_Final/src/java/delete.java new file mode 100644 index 0000000..588f28c --- /dev/null +++ b/Adv_Java_Project_Final/src/java/delete.java @@ -0,0 +1,41 @@ + +import javax.servlet.*; +import java.io.*; +import javax.servlet.http.*; +import java.sql.*; + +public class delete extends HttpServlet { + + public void doGet(HttpServletRequest Request, HttpServletResponse Response) throws IOException, ServletException { + PrintWriter out = Response.getWriter(); + out.println(""); + out.println("" + + "
" + + "
Enter first Name " + + "
" + + "
"); + + String s1 = Request.getParameter("email"); + String s2 = Request.getParameter("password"); + try { + Class.forName("com.mysql.jdbc.Driver"); + String db_ur1 = "jdbc:mysql://localhost:3306/assignment_db"; + String db_uname = "root"; + String db_upass = "root"; + Connection con = DriverManager.getConnection(db_ur1, db_uname, db_upass); + Statement st = con.createStatement(); + st.executeUpdate("delete from usere where email='" + s1 + "' and password = '" + s2 + "'"); + Response.sendRedirect("User_home.jsp"); + } catch (Exception e1) { + out.println(e1); + } + + out.println(""); + out.println(""); + out.println(""); + out.close(); + } +} diff --git a/Adv_Java_Project_Final/src/java/login_db.java b/Adv_Java_Project_Final/src/java/login_db.java new file mode 100644 index 0000000..2ea79ae --- /dev/null +++ b/Adv_Java_Project_Final/src/java/login_db.java @@ -0,0 +1,49 @@ + +import java.io.*; +import javax.servlet.*; +import javax.servlet.http.*; +import java.sql.*; + +public class login_db extends HttpServlet { + + public void doGet(HttpServletRequest Request, HttpServletResponse Response) throws IOException, ServletException { + PrintWriter out = Response.getWriter(); + out.println(""); + out.println(""); + String s1 = Request.getParameter("email"); + String s2 = Request.getParameter("password"); + + try { + Class.forName("com.mysql.jdbc.Driver"); + + String db_ur1 = "jdbc:mysql://localhost:3306/assignment_db"; + String db_uname = "root"; + String db_upass = "root"; + Connection con = DriverManager.getConnection(db_ur1, db_uname, db_upass); + Statement st = con.createStatement(); + + ResultSet rs = st.executeQuery("select * from usere where email='" + s1 + "' AND password='" + s2 + "'"); + if (rs.next()) { + String fname = rs.getString(1); + HttpSession session = Request.getSession(); + session.setAttribute("fname", fname); + + out.write("\n"); + + Response.sendRedirect("User_home.jsp"); +// out.write("\n"); + } else { + RequestDispatcher dis = Request.getRequestDispatcher("login.jsp"); + dis.include(Request, Response); + } + con.close(); + } catch (Exception e1) { + out.println(e1); + } + + out.println(""); + out.println(""); + out.close(); + + } +} diff --git a/Adv_Java_Project_Final/src/java/register_db.java b/Adv_Java_Project_Final/src/java/register_db.java new file mode 100644 index 0000000..aaded52 --- /dev/null +++ b/Adv_Java_Project_Final/src/java/register_db.java @@ -0,0 +1,42 @@ + +import java.io.*; +import javax.servlet.*; +import javax.servlet.http.*; +import java.sql.*; + +public class register_db extends HttpServlet { + + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + PrintWriter out = response.getWriter(); + out.println(""); + out.println(""); + +// + String s1 = request.getParameter("fname"); + String s2 = request.getParameter("lname"); + String s3 = request.getParameter("email"); + String s4 = request.getParameter("address"); + String s5 = request.getParameter("city"); + String s6 = request.getParameter("state"); + String s7 = request.getParameter("country"); + String s8 = request.getParameter("zip"); + String s9 = request.getParameter("phone"); + String s10 = request.getParameter("password"); + try { + Class.forName("com.mysql.jdbc.Driver"); + Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/assignment_db", "root", "root"); + Statement st = con.createStatement(); + st.executeUpdate("insert into usere values('" + s1 + "','" + s2 + "','" + s3 + "','" + s4 + "','" + s5 + "','" + s6 + "','" + s7 + "','" + s8 + "','" + s9 + "','" + s10 + "')"); + con.close(); + out.write("\n"); + response.sendRedirect("login.jsp"); + out.println("data insert"); + } catch (Exception e1) { + out.println(e1); + } + out.println(""); + out.println(""); + out.close(); + } +} diff --git a/Adv_Java_Project_Final/src/java/update.java b/Adv_Java_Project_Final/src/java/update.java new file mode 100644 index 0000000..fac6389 --- /dev/null +++ b/Adv_Java_Project_Final/src/java/update.java @@ -0,0 +1,45 @@ + +import javax.servlet.*; +import java.io.*; +import javax.servlet.http.*; +import java.sql.*; + +public class update extends HttpServlet { + + public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + PrintWriter out = response.getWriter(); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + + String s1 = request.getParameter("fname"); + String s2 = request.getParameter("lname"); + String s3 = request.getParameter("email"); + String s4 = request.getParameter("address"); + String s5 = request.getParameter("city"); + String s6 = request.getParameter("state"); + String s7 = request.getParameter("country"); + String s8 = request.getParameter("zip"); + String s9 = request.getParameter("phone"); + String s10 = request.getParameter("password"); + try { + Class.forName("com.mysql.jdbc.Driver"); + String db_ur1 = "jdbc:mysql://localhost:3306/assignment_db"; + String db_uname = "root"; + String db_upass = "root"; + Connection con = DriverManager.getConnection(db_ur1, db_uname, db_upass); + Statement st = con.createStatement(); + st.executeUpdate("UPDATE usere SET fname='" + s1 + "', lname='" + s2 + "',address='" + s4 + "', city='" + s5 + "',state='" + s6 + "', country='" + s7 + "',zip='" + s8 + "', phone='" + s9 + "' where email='" + s3 + "'and password='" + s10 + "' "); + response.sendRedirect("User_home.jsp"); + } catch (Exception e1) { + out.println(e1); + } + + out.println(""); + out.println(""); + out.println(""); + out.close(); + } +} diff --git a/Adv_Java_Project_Final/web/JS/Script1.js b/Adv_Java_Project_Final/web/JS/Script1.js new file mode 100644 index 0000000..a3ad891 --- /dev/null +++ b/Adv_Java_Project_Final/web/JS/Script1.js @@ -0,0 +1,3 @@ + /* global script */ + + diff --git a/Adv_Java_Project_Final/web/META-INF/context.xml b/Adv_Java_Project_Final/web/META-INF/context.xml new file mode 100644 index 0000000..19dfe5c --- /dev/null +++ b/Adv_Java_Project_Final/web/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/Adv_Java_Project_Final/web/Styles/style1.css b/Adv_Java_Project_Final/web/Styles/style1.css new file mode 100644 index 0000000..8f43177 --- /dev/null +++ b/Adv_Java_Project_Final/web/Styles/style1.css @@ -0,0 +1,136 @@ + body + { + /*display: flex;*/ + justify-content: center; + background-image: url('BG1.jpg'); + } + + #page + { + border: 2px red; + display: flex; + justify-content: center; + + + } + .main + { + text-align: center; + align-self: center; + border: 2px solid black; + padding-bottom: 20px; + background-color: antiquewhite; + /*background-color: rgb(153,95,185);*/ + /* padding-left: -100px; + padding-right: -100px;*/ + border-radius: 10px; + box-shadow: 5px 5px 5px black; + } + + table + { + align-self: center; + margin: auto; + + + } + .had + { + + text-decoration: underline; + font-size: 25; + } + .tablebox + + { + padding-left: 40px; + padding-right: 40px; + + } + .button-17 { + margin-top: 20px; + align-items: center; + appearance: none; + background-color: burlywood ; + border-radius: 24px; + border-style: none; + box-shadow: rgba(0, 0, 0, .2) 0 3px 5px -1px,rgba(0, 0, 0, .14) 0 6px 10px 0,rgba(0, 0, 0, .12) 0 1px 18px 0; + box-sizing: border-box; + color: #3c4043; + cursor: pointer; + display: inline-flex; + fill: currentcolor; + font-family: "Google Sans",Roboto,Arial,sans-serif; + font-size: 14px; + font-weight: 500; + height: 48px; + justify-content: center; + letter-spacing: .25px; + line-height: normal; + max-width: 100%; + overflow: visible; + padding: 2px 24px; + position: relative; + text-align: center; + text-transform: none; + transition: box-shadow 280ms cubic-bezier(.4, 0, .2, 1),opacity 15ms linear 30ms,transform 270ms cubic-bezier(0, 0, .2, 1) 0ms; + user-select: none; + -webkit-user-select: none; + touch-action: manipulation; + width: auto; + will-change: transform,opacity; + z-index: 0; + } + + .button-17:hover { + background: #F6F9FE; + color: #174ea6; + } + + .button-17:active { + box-shadow: 0 4px 4px 0 rgb(60 64 67 / 30%), 0 8px 12px 6px rgb(60 64 67 / 15%); + outline: none; + } + + .button-17:focus { + outline: none; + border: 2px solid #4285f4; + } + + .button-17:not(:disabled) { + box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px; + } + + .button-17:not(:disabled):hover { + box-shadow: rgba(60, 64, 67, .3) 0 2px 3px 0, rgba(60, 64, 67, .15) 0 6px 10px 4px; + } + + .button-17:not(:disabled):focus { + box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px; + } + + .button-17:not(:disabled):active { + box-shadow: rgba(60, 64, 67, .3) 0 4px 4px 0, rgba(60, 64, 67, .15) 0 8px 12px 6px; + } + + .button-17:disabled { + box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px; + } + + #buttonup + { + border: 2px solid black; + border-radius: 8px; + background-color: burlywood; + + } + table + { + text-align: center; + + } + td + { + text-transform: capitalize; + } + \ No newline at end of file diff --git a/Adv_Java_Project_Final/web/Styles/style2.css b/Adv_Java_Project_Final/web/Styles/style2.css new file mode 100644 index 0000000..99a9f25 --- /dev/null +++ b/Adv_Java_Project_Final/web/Styles/style2.css @@ -0,0 +1,143 @@ + + @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap'); + *{ + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'Poppins',sans-serif; + } + + body{ + height: 110vh; + display: flex; + justify-content: center; + align-items: center; + padding: auto; + margin: auto; + /*background: linear-gradient(135deg, #71b7e6, #9b59b6);*/ + background: burlywood; + } + #nav{ + + display: flex; + } + .container{ + max-width: 700px; + width: 100%; + background-color: antiquewhite; + padding: 25px 30px; + margin: 250px 30px; + border-radius: 5px; + box-shadow: 0 5px 10px rgba(0,0,0,0.5); + } + .container .title{ + font-size: 25px; + font-weight: 500; + position: relative; + } + .container .title::before{ + content: ""; + position: absolute; + left: 0; + bottom: 0; + height: 3px; + width: 30px; + border-radius: 5px; + background: linear-gradient(135deg, #71b7e6, #9b59b6); + } + .content form .user-details{ + display: flex; + flex-wrap: wrap; + justify-content: space-between; + margin: 20px 0 12px 0; + } + form .user-details .input-box{ + margin-bottom: 15px; + width: calc(100% / 2 - 20px); + } + form .input-box span.details{ + display: block; + font-weight: 500; + margin-bottom: 5px; + } + .user-details .input-box input{ + height: 45px; + width: 100%; + outline: none; + font-size: 16px; + border-radius: 5px; + padding-left: 15px; + border: 1px solid #ccc; + border-bottom-width: 2px; + transition: all 0.3s ease; + } + .user-details .input-box input:focus, + .user-details .input-box input:valid{ + border-color: #9b59b6; + } + + form .category label .dot{ + height: 18px; + width: 18px; + border-radius: 50%; + margin-right: 10px; + background: #d9d9d9; + border: 5px solid transparent; + transition: all 0.3s ease; + } + #dot-1:checked ~ .category label .one, + #dot-2:checked ~ .category label .two, + #dot-3:checked ~ .category label .three{ + background: #9b59b6; + border-color: #d9d9d9; + } + form input[type="radio"]{ + display: none; + } + form .button{ + height: 45px; + margin: 35px 0 + } + form .button input{ + height: 100%; + width: 100%; + border-radius: 5px; + border: none; + color: #fff; + font-size: 18px; + font-weight: 500; + letter-spacing: 1px; + cursor: pointer; + transition: all 0.3s ease; + background: linear-gradient(135deg, #71b7e6, #9b59b6); + } + form .button input:hover{ + /* transform: scale(0.99); */ + background: linear-gradient(-135deg, #71b7e6, #9b59b6); + } + @media(max-width: 584px){ + .container{ + max-width: 100%; + } + form .user-details .input-box{ + margin-bottom: 15px; + width: 100%; + } + form .category{ + width: 100%; + } + .content form .user-details{ + max-height: 300px; + overflow-y: scroll; + } + .user-details::-webkit-scrollbar{ + width: 5px; + } + } + @media(max-width: 459px){ + .container .content .category{ + flex-direction: column; + } + } + + \ No newline at end of file diff --git a/Adv_Java_Project_Final/web/Styles/style3.css b/Adv_Java_Project_Final/web/Styles/style3.css new file mode 100644 index 0000000..99f9e43 --- /dev/null +++ b/Adv_Java_Project_Final/web/Styles/style3.css @@ -0,0 +1,50 @@ +*{ + + box-sizing: border-box; + /*font-family: 'Poppins',sans-serif;*/ + } + + body + { + background-color: bisque; + /*background: linear-gradient(135deg, #71b7e6, #9b59b6);*/ + color: black; + + height: 100vh; + /*display: flex;*/ + /*justify-content: center;*/ + /*align-items: center;*/ + /*padding: 10px;*/ + background:bisque; + } + #buttonup + { + border: 2px solid black; + border-radius: 8px; + background-color: burlywood; + margin-right: 5px; + + } + #para + { + color: black; + background-color:blanchedalmond; + margin: 30px 30px 30px ; + } + .para + { + + margin: 30px 30px 30px ; + } + #divH + { + + text-align: center; + + } + #hading + { + text-decoration: underline; + + } + \ No newline at end of file diff --git a/Adv_Java_Project_Final/web/Styles/style4.css b/Adv_Java_Project_Final/web/Styles/style4.css new file mode 100644 index 0000000..a0683db --- /dev/null +++ b/Adv_Java_Project_Final/web/Styles/style4.css @@ -0,0 +1,59 @@ + +*{ +/* margin: 0; + padding: 0;*/ + box-sizing: border-box; + font-family: 'Poppins',sans-serif; + } + +body + { + height: 100vh; + /*display: flex;*/ + justify-content: center; + /*align-items: center;*/ + padding: 10px; + background: bisque; +/*background-color: bisque;*/ + } + #nav + { + color: #3c4043; + justify-content: center; + align-self: center; + margin: auto; + + } + .hadding + { + color: black; + text-decoration: underline; + align-items: center; + justify-content: center; + display: block; + + } + nav{ + margin-top: 40px; + justify-content: center; + display: flex; + + } + #para + { + color: black; + margin: 30px 30px 30px ; + background: antiquewhite; + } + #buttonup + { + border: 2px solid black; + border-radius: 8px; + background-color: burlywood; + margin-right: 5px; + + } +/* #nav{ +align-items: center; +align-self: center; + }*/ diff --git a/Adv_Java_Project_Final/web/User_home.jsp b/Adv_Java_Project_Final/web/User_home.jsp new file mode 100644 index 0000000..ce3e305 --- /dev/null +++ b/Adv_Java_Project_Final/web/User_home.jsp @@ -0,0 +1,52 @@ + + + + + + + + + <% + String fname = (String) session.getAttribute("fname"); + %> +
+

Advance Java Assignment

+
+
+
+
+
+ + + +
+
+
+
+ +
+

Welcome,<%=fname %>

+
+
+ Welcome to the Java Web Application, This application performed all crud operation and have also have functionality of session management with customized web View. + +
+ + +
+
+
 
+
+
+ + + + + + + diff --git a/Adv_Java_Project_Final/web/WEB-INF/web.xml b/Adv_Java_Project_Final/web/WEB-INF/web.xml new file mode 100644 index 0000000..9df9fc4 --- /dev/null +++ b/Adv_Java_Project_Final/web/WEB-INF/web.xml @@ -0,0 +1,55 @@ + + + + register_db + register_db + + + login_db + login_db + + + update + update + + + delete + delete + + + register_db + /register_db + + + login_db + /login_db + + + update + /update + + + delete + /delete + + + + 30 + + + + + f1 + Filters.filter1 + + + f1 + /User_home.jsp + /search_user.html + /search_user.jsp + /showdata.jsp + /delete.jsp + /update.html + /logout.jsp + + diff --git a/Adv_Java_Project_Final/web/delete.jsp b/Adv_Java_Project_Final/web/delete.jsp new file mode 100644 index 0000000..c5fee70 --- /dev/null +++ b/Adv_Java_Project_Final/web/delete.jsp @@ -0,0 +1,59 @@ + + + + + + + + + + + + +
+
Delete User
+
+
+
+
+ Email + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + diff --git a/Adv_Java_Project_Final/web/index.jsp b/Adv_Java_Project_Final/web/index.jsp new file mode 100644 index 0000000..eb9b7e6 --- /dev/null +++ b/Adv_Java_Project_Final/web/index.jsp @@ -0,0 +1,39 @@ + + + + + + + INDEX + + + + + + +

Advance Java Assignment

+ +
+ +

What is CRUD?

+

CRUD Meaning :

CRUD is an acronym that comes from the world of computer programming and refers to the four functions that are considered necessary to implement a persistent storage application: create, read, update and delete. Persistent storage refers to any data storage device that retains power after the device is powered off, such as a hard disk or a solid-state drive. In contrast, random access memory and internal caching are two examples of volatile memory - they contain data that will be erased when they lose power. + + Explaining CRUD Operations + Organizations that keep track of customer data, accounts, payment information, health data, and other records require data storage hardware and applications that provide persistent storage. This data is typically organized into a database, which is simply an organized collection of data that may be viewed electronically. There are many types of databases: hierarchical databases, graph databases, and object-oriented databases to name a few. The most commonly implemented type of database is a relational database, which consists of data tabled in rows and columns and connected to other tables with complementary information by a system of keywords that includes primary keys and foreign keys. + + + +
+ + + + diff --git a/Adv_Java_Project_Final/web/login.jsp b/Adv_Java_Project_Final/web/login.jsp new file mode 100644 index 0000000..206d2f8 --- /dev/null +++ b/Adv_Java_Project_Final/web/login.jsp @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + +
+ + +
Login
+
+ +
+
+
+ Email + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + diff --git a/Adv_Java_Project_Final/web/logout.jsp b/Adv_Java_Project_Final/web/logout.jsp new file mode 100644 index 0000000..65d7444 --- /dev/null +++ b/Adv_Java_Project_Final/web/logout.jsp @@ -0,0 +1,7 @@ +<% + session.invalidate(); +response.setHeader("Cache-Control","no-cache,no-store"); +response.sendRedirect("index.html"); + + +%> diff --git a/Adv_Java_Project_Final/web/register.html b/Adv_Java_Project_Final/web/register.html new file mode 100644 index 0000000..4648a08 --- /dev/null +++ b/Adv_Java_Project_Final/web/register.html @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + +
+
Registration
+
+
+
+
+ First Name + +
+
+ Last Name + +
+
+ Email + +
+
+ Address + +
+
+ City + +
+
+ State + +
+
+ Country + +
+
+ Zip + +
+
+ Phone + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + diff --git a/Adv_Java_Project_Final/web/search_user.html b/Adv_Java_Project_Final/web/search_user.html new file mode 100644 index 0000000..c2d2a36 --- /dev/null +++ b/Adv_Java_Project_Final/web/search_user.html @@ -0,0 +1,58 @@ + + + + + + + + + + + +
+
Find User
+
+
+
+
+ Email + +
+
+ First Name + +
+
+
+ +
+
+
+
+ + + diff --git a/Adv_Java_Project_Final/web/search_user.jsp b/Adv_Java_Project_Final/web/search_user.jsp new file mode 100644 index 0000000..8425a13 --- /dev/null +++ b/Adv_Java_Project_Final/web/search_user.jsp @@ -0,0 +1,81 @@ +<%@page import="java.sql.*"%> +<%@include file="User_home.jsp" %> + + + + + + +
+ +
+
+

List

+
+ + <% + String e1 = request.getParameter("email"); + String f1 = request.getParameter("fname"); + + try { + Class.forName("com.mysql.jdbc.Driver"); + // Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/assignment_db","root","root"); + // Class.forName("com.mysql.cj.jdbc.Driver"); + String db_ur1 = "jdbc:mysql://localhost:3306/assignment_db"; + String db_uname = "root"; + String db_upass = "root"; + Connection con = DriverManager.getConnection(db_ur1, db_uname, db_upass); + Statement st = con.createStatement(); + + ResultSet rs = st.executeQuery("select * from usere where email = '" + e1 + "' and fname = '" + f1 + "'"); + %> + + + + + + + + + + + + + + + + + <% while (rs.next()) { %> + + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + + + + <% + + } + con.close(); + %> +
First Name Last Name Address City Zip State Country Zip Phone
" + rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3) + " " + rs.getString(4) + " " + rs.getString(5) + " " + rs.getString(6) + " " + rs.getString(7) + " " + rs.getString(8) + " " + rs.getString(9) + "
+ + <% + } catch (Exception e2) { + System.out.println(e2); + + } + %> + +
+
+
+
+ + diff --git a/Adv_Java_Project_Final/web/showdata.jsp b/Adv_Java_Project_Final/web/showdata.jsp new file mode 100644 index 0000000..6e45921 --- /dev/null +++ b/Adv_Java_Project_Final/web/showdata.jsp @@ -0,0 +1,89 @@ +<%@page import="java.sql.*"%> + +<%@include file="User_home.jsp" %> + + + + + + +
+ +
+
+

List

+
+ + + <% + + try { + Class.forName("com.mysql.jdbc.Driver"); + + String db_ur1 = "jdbc:mysql://localhost:3306/assignment_db"; + String db_uname = "root"; + String db_upass = "root"; + Connection con = DriverManager.getConnection(db_ur1, db_uname, db_upass); + Statement st = con.createStatement(); + + ResultSet rs = st.executeQuery("select * from usere"); + %> + + + + + + + + + + + + + + + + + + + + + <% while (rs.next()) { %> + + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + <% out.println(""); %> + + + + + + + + + <% + + } + con.close(); + %> +
First Name Last Name Email City Zip State Country Zip Phone Update Delete
" + rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3) + " " + rs.getString(4) + " " + rs.getString(5) + " " + rs.getString(6) + " " + rs.getString(7) + " " + rs.getString(8) + " " + rs.getString(9) + "
+ + <% + } catch (Exception e1) { + System.out.println(e1); + + } + %> + +
+
+
+
+ + diff --git a/Adv_Java_Project_Final/web/update.html b/Adv_Java_Project_Final/web/update.html new file mode 100644 index 0000000..79b50f2 --- /dev/null +++ b/Adv_Java_Project_Final/web/update.html @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + +
+
Update
+
+
+
+
+ First Name + +
+
+ Last Name + +
+
+ Email + +
+
+ Address + +
+
+ City + +
+
+ State + +
+
+ Country + +
+
+ Zip + +
+
+ Phone + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + + + + + +