diff --git a/Advance_Java_Assignment/build.xml b/Advance_Java_Assignment/build.xml new file mode 100644 index 0000000..4599480 --- /dev/null +++ b/Advance_Java_Assignment/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project Advance_Java_Assignment. + + + diff --git a/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/User_005fhome_jsp.class b/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/User_005fhome_jsp.class new file mode 100644 index 0000000..91c219e Binary files /dev/null and b/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/User_005fhome_jsp.class differ diff --git a/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/home_jsp.class b/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/home_jsp.class new file mode 100644 index 0000000..6b2970a Binary files /dev/null and b/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/home_jsp.class differ diff --git a/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/index_jsp.class b/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/index_jsp.class new file mode 100644 index 0000000..a930298 Binary files /dev/null and b/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/index_jsp.class differ diff --git a/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/register_jsp.class b/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/register_jsp.class new file mode 100644 index 0000000..d3c9378 Binary files /dev/null and b/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/register_jsp.class differ diff --git a/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/showdata_jsp.class b/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/showdata_jsp.class new file mode 100644 index 0000000..5757878 Binary files /dev/null and b/Advance_Java_Assignment/build/generated/classes/org/apache/jsp/showdata_jsp.class differ diff --git a/Advance_Java_Assignment/build/generated/src/org/apache/jsp/User_005fhome_jsp.class.smap b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/User_005fhome_jsp.class.smap new file mode 100644 index 0000000..59c0532 --- /dev/null +++ b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/User_005fhome_jsp.class.smap @@ -0,0 +1,14 @@ +SMAP +User_005fhome_jsp.java +JSP +*S JSP +*F ++ 0 User_home.jsp +User_home.jsp +*L +1,19:44 +20,2:64 +21:66 +22:67,3 +23,14:70 +*E diff --git a/Advance_Java_Assignment/build/generated/src/org/apache/jsp/User_005fhome_jsp.java b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/User_005fhome_jsp.java new file mode 100644 index 0000000..895c51a --- /dev/null +++ b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/User_005fhome_jsp.java @@ -0,0 +1,96 @@ +package org.apache.jsp; + +import javax.servlet.*; +import javax.servlet.http.*; +import javax.servlet.jsp.*; + +public final class User_005fhome_jsp extends org.apache.jasper.runtime.HttpJspBase + implements org.apache.jasper.runtime.JspSourceDependent { + + private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); + + private static java.util.List _jspx_dependants; + + private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector; + + public java.util.List getDependants() { + return _jspx_dependants; + } + + public void _jspService(HttpServletRequest request, HttpServletResponse response) + throws java.io.IOException, ServletException { + + PageContext pageContext = null; + HttpSession session = null; + ServletContext application = null; + ServletConfig config = null; + JspWriter out = null; + Object page = this; + JspWriter _jspx_out = null; + PageContext _jspx_page_context = null; + + try { + response.setContentType("text/html"); + pageContext = _jspxFactory.getPageContext(this, request, response, + null, true, 8192, true); + _jspx_page_context = pageContext; + application = pageContext.getServletContext(); + config = pageContext.getServletConfig(); + session = pageContext.getSession(); + out = pageContext.getOut(); + _jspx_out = out; + _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); + + out.write("\n"); + out.write(" \n"); + out.write("
\t\n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write(" Show Data\n"); + out.write(" Search User\n"); + out.write(" Delete User\n"); + out.write(" Update\n"); + out.write(" Logout\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\t\n"); + out.write("\n"); + out.write("
\t\n"); + out.write(" "); + + String email = (String) session.getAttribute("email"); + + out.write("\n"); + out.write("

Welcome , "); + out.print(email); + out.write("

\n"); + out.write("
\n"); + out.write("

\n"); + out.write(" Welcome to the Java Web Application, This application performed all crud operation and have also have functionality of session management with customized web View.\n"); + out.write(" \n"); + out.write("

\n"); + out.write(" \n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write("
 
\n"); + out.write("
\n"); + out.write("
\n"); + out.write(" \n"); + out.write(""); + } catch (Throwable t) { + if (!(t instanceof SkipPageException)){ + out = _jspx_out; + if (out != null && out.getBufferSize() != 0) + out.clearBuffer(); + if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); + else throw new ServletException(t); + } + } finally { + _jspxFactory.releasePageContext(_jspx_page_context); + } + } +} diff --git a/Advance_Java_Assignment/build/generated/src/org/apache/jsp/home_jsp.class.smap b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/home_jsp.class.smap new file mode 100644 index 0000000..5479118 --- /dev/null +++ b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/home_jsp.class.smap @@ -0,0 +1,14 @@ +SMAP +home_jsp.java +JSP +*S JSP +*F ++ 0 home.jsp +home.jsp +*L +1,18:44 +19,2:63 +20:65 +21:66,3 +22,14:69 +*E diff --git a/Advance_Java_Assignment/build/generated/src/org/apache/jsp/home_jsp.java b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/home_jsp.java new file mode 100644 index 0000000..6239d54 --- /dev/null +++ b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/home_jsp.java @@ -0,0 +1,95 @@ +package org.apache.jsp; + +import javax.servlet.*; +import javax.servlet.http.*; +import javax.servlet.jsp.*; + +public final class home_jsp extends org.apache.jasper.runtime.HttpJspBase + implements org.apache.jasper.runtime.JspSourceDependent { + + private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); + + private static java.util.List _jspx_dependants; + + private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector; + + public java.util.List getDependants() { + return _jspx_dependants; + } + + public void _jspService(HttpServletRequest request, HttpServletResponse response) + throws java.io.IOException, ServletException { + + PageContext pageContext = null; + HttpSession session = null; + ServletContext application = null; + ServletConfig config = null; + JspWriter out = null; + Object page = this; + JspWriter _jspx_out = null; + PageContext _jspx_page_context = null; + + try { + response.setContentType("text/html"); + pageContext = _jspxFactory.getPageContext(this, request, response, + null, true, 8192, true); + _jspx_page_context = pageContext; + application = pageContext.getServletContext(); + config = pageContext.getServletConfig(); + session = pageContext.getSession(); + out = pageContext.getOut(); + _jspx_out = out; + _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); + + out.write("\n"); + out.write(" \n"); + out.write("
\t\n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write(" Login |\n"); + out.write(" Register |\n"); + out.write(" Show Data\n"); + out.write(" Search User\n"); + out.write(" Delete User\n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\t\n"); + out.write("\n"); + out.write("
\t\n"); + out.write(" "); + + String email = (String) session.getAttribute("email"); + + out.write("\n"); + out.write("

Welcome , "); + out.print(email); + out.write("

\n"); + out.write("
\n"); + out.write("

\n"); + out.write(" Welcome to the Java Web Application, This application performed all crud operation and have also have functionality of session management with customized web View.\n"); + out.write(" \n"); + out.write("

\n"); + out.write(" \n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write("
 
\n"); + out.write("
\n"); + out.write("
\n"); + out.write(" \n"); + out.write(""); + } catch (Throwable t) { + if (!(t instanceof SkipPageException)){ + out = _jspx_out; + if (out != null && out.getBufferSize() != 0) + out.clearBuffer(); + if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); + else throw new ServletException(t); + } + } finally { + _jspxFactory.releasePageContext(_jspx_page_context); + } + } +} diff --git a/Advance_Java_Assignment/build/generated/src/org/apache/jsp/index_jsp.class.smap b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/index_jsp.class.smap new file mode 100644 index 0000000..2a32c32 --- /dev/null +++ b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/index_jsp.class.smap @@ -0,0 +1,10 @@ +SMAP +index_jsp.java +JSP +*S JSP +*F ++ 0 index.jsp +index.jsp +*L +1,62:44 +*E diff --git a/Advance_Java_Assignment/build/generated/src/org/apache/jsp/index_jsp.java b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/index_jsp.java new file mode 100644 index 0000000..fab448b --- /dev/null +++ b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/index_jsp.java @@ -0,0 +1,117 @@ +package org.apache.jsp; + +import javax.servlet.*; +import javax.servlet.http.*; +import javax.servlet.jsp.*; + +public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase + implements org.apache.jasper.runtime.JspSourceDependent { + + private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); + + private static java.util.List _jspx_dependants; + + private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector; + + public java.util.List getDependants() { + return _jspx_dependants; + } + + public void _jspService(HttpServletRequest request, HttpServletResponse response) + throws java.io.IOException, ServletException { + + PageContext pageContext = null; + HttpSession session = null; + ServletContext application = null; + ServletConfig config = null; + JspWriter out = null; + Object page = this; + JspWriter _jspx_out = null; + PageContext _jspx_page_context = null; + + try { + response.setContentType("text/html"); + pageContext = _jspxFactory.getPageContext(this, request, response, + null, true, 8192, true); + _jspx_page_context = pageContext; + application = pageContext.getServletContext(); + config = pageContext.getServletConfig(); + session = pageContext.getSession(); + out = pageContext.getOut(); + _jspx_out = out; + _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); + + out.write("\n"); + out.write("\n"); + out.write("\n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" INDEX\n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write("

Assignment_5

\n"); + out.write("
\n"); + out.write(" \n"); + out.write("
\n"); + out.write(" \n"); + out.write(" \n"); + out.write("
\n"); + out.write(" \n"); + out.write("
\n"); + out.write("\n"); + out.write("\n"); + } catch (Throwable t) { + if (!(t instanceof SkipPageException)){ + out = _jspx_out; + if (out != null && out.getBufferSize() != 0) + out.clearBuffer(); + if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); + else throw new ServletException(t); + } + } finally { + _jspxFactory.releasePageContext(_jspx_page_context); + } + } +} diff --git a/Advance_Java_Assignment/build/generated/src/org/apache/jsp/register_jsp.class.smap b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/register_jsp.class.smap new file mode 100644 index 0000000..8e5259d --- /dev/null +++ b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/register_jsp.class.smap @@ -0,0 +1,10 @@ +SMAP +register_jsp.java +JSP +*S JSP +*F ++ 0 register.jsp +register.jsp +*L +1,220:44 +*E diff --git a/Advance_Java_Assignment/build/generated/src/org/apache/jsp/register_jsp.java b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/register_jsp.java new file mode 100644 index 0000000..51656b3 --- /dev/null +++ b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/register_jsp.java @@ -0,0 +1,275 @@ +package org.apache.jsp; + +import javax.servlet.*; +import javax.servlet.http.*; +import javax.servlet.jsp.*; + +public final class register_jsp extends org.apache.jasper.runtime.HttpJspBase + implements org.apache.jasper.runtime.JspSourceDependent { + + private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); + + private static java.util.List _jspx_dependants; + + private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector; + + public java.util.List getDependants() { + return _jspx_dependants; + } + + public void _jspService(HttpServletRequest request, HttpServletResponse response) + throws java.io.IOException, ServletException { + + PageContext pageContext = null; + HttpSession session = null; + ServletContext application = null; + ServletConfig config = null; + JspWriter out = null; + Object page = this; + JspWriter _jspx_out = null; + PageContext _jspx_page_context = null; + + try { + response.setContentType("text/html"); + pageContext = _jspxFactory.getPageContext(this, request, response, + null, true, 8192, true); + _jspx_page_context = pageContext; + application = pageContext.getServletContext(); + config = pageContext.getServletConfig(); + session = pageContext.getSession(); + out = pageContext.getOut(); + _jspx_out = out; + _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); + + out.write("\n"); + out.write("\n"); + out.write("\n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write("\n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write("\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
Registration
\n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write(" First Name\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write(" Last Name\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write(" Email\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write(" Address\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write(" City\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write(" State\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write(" Country\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write(" Zip\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write(" Phone\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write(" Password\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write(" \n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write("\n"); + out.write("\n"); + out.write("\n"); + } catch (Throwable t) { + if (!(t instanceof SkipPageException)){ + out = _jspx_out; + if (out != null && out.getBufferSize() != 0) + out.clearBuffer(); + if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); + else throw new ServletException(t); + } + } finally { + _jspxFactory.releasePageContext(_jspx_page_context); + } + } +} diff --git a/Advance_Java_Assignment/build/generated/src/org/apache/jsp/showdata_jsp.class.smap b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/showdata_jsp.class.smap new file mode 100644 index 0000000..f939b5c --- /dev/null +++ b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/showdata_jsp.class.smap @@ -0,0 +1,16 @@ +SMAP +showdata_jsp.java +JSP +*S JSP +*F ++ 0 showdata.jsp +showdata.jsp +*L +1,29:47 +30,4:77 +33,2:81 +35,9:83,3 +44:110 +45:111,3 +46,10:114 +*E diff --git a/Advance_Java_Assignment/build/generated/src/org/apache/jsp/showdata_jsp.java b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/showdata_jsp.java new file mode 100644 index 0000000..5304d8c --- /dev/null +++ b/Advance_Java_Assignment/build/generated/src/org/apache/jsp/showdata_jsp.java @@ -0,0 +1,135 @@ +package org.apache.jsp; + +import javax.servlet.*; +import javax.servlet.http.*; +import javax.servlet.jsp.*; +import java.util.*; +import DAO.userdao; +import DTO.userdto; + +public final class showdata_jsp extends org.apache.jasper.runtime.HttpJspBase + implements org.apache.jasper.runtime.JspSourceDependent { + + private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); + + private static java.util.List _jspx_dependants; + + private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector; + + public java.util.List getDependants() { + return _jspx_dependants; + } + + public void _jspService(HttpServletRequest request, HttpServletResponse response) + throws java.io.IOException, ServletException { + + PageContext pageContext = null; + HttpSession session = null; + ServletContext application = null; + ServletConfig config = null; + JspWriter out = null; + Object page = this; + JspWriter _jspx_out = null; + PageContext _jspx_page_context = null; + + try { + response.setContentType("text/html"); + pageContext = _jspxFactory.getPageContext(this, request, response, + null, true, 8192, true); + _jspx_page_context = pageContext; + application = pageContext.getServletContext(); + config = pageContext.getServletConfig(); + session = pageContext.getSession(); + out = pageContext.getOut(); + _jspx_out = out; + _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); + + out.write("\n"); + out.write("\n"); + out.write("\t\n"); + out.write("
\n"); + out.write("\n"); + out.write("
\n"); + out.write("
\n"); + out.write("

List

\n"); + out.write("
\n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" "); + + userdao ad = new userdao(); + List list = ad.getList(); + for (userdto rt : list) { + + out.write("\n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" \n"); + out.write(" "); +} + out.write("\n"); + out.write(" \n"); + out.write("\n"); + out.write("
First Name
Id
last NameEmailAddressCityStateCountryZipPhone
"); + out.print(rt.getFname()); + out.write(""); + out.print(rt.getLname()); + out.write(""); + out.print(rt.getEmail()); + out.write(""); + out.print(rt.getAddress()); + out.write(""); + out.print(rt.getCity()); + out.write(""); + out.print(rt.getState()); + out.write(""); + out.print(rt.getCountry()); + out.write(""); + out.print(rt.getZip()); + out.write(""); + out.print(rt.getPhone()); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write("
\n"); + out.write("\n"); + out.write("\n"); + } catch (Throwable t) { + if (!(t instanceof SkipPageException)){ + out = _jspx_out; + if (out != null && out.getBufferSize() != 0) + out.clearBuffer(); + if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); + else throw new ServletException(t); + } + } finally { + _jspxFactory.releasePageContext(_jspx_page_context); + } + } +} diff --git a/Advance_Java_Assignment/build/web/BG1.jpg b/Advance_Java_Assignment/build/web/BG1.jpg new file mode 100644 index 0000000..5f3571e Binary files /dev/null and b/Advance_Java_Assignment/build/web/BG1.jpg differ diff --git a/Advance_Java_Assignment/build/web/BG2.webp b/Advance_Java_Assignment/build/web/BG2.webp new file mode 100644 index 0000000..d6ba45d Binary files /dev/null and b/Advance_Java_Assignment/build/web/BG2.webp differ diff --git a/Advance_Java_Assignment/build/web/META-INF/MANIFEST.MF b/Advance_Java_Assignment/build/web/META-INF/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/Advance_Java_Assignment/build/web/META-INF/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/Advance_Java_Assignment/build/web/META-INF/context.xml b/Advance_Java_Assignment/build/web/META-INF/context.xml new file mode 100644 index 0000000..c3c272e --- /dev/null +++ b/Advance_Java_Assignment/build/web/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/Advance_Java_Assignment/build/web/PNG1.png b/Advance_Java_Assignment/build/web/PNG1.png new file mode 100644 index 0000000..63c7912 Binary files /dev/null and b/Advance_Java_Assignment/build/web/PNG1.png differ diff --git a/Advance_Java_Assignment/build/web/User_home.jsp b/Advance_Java_Assignment/build/web/User_home.jsp new file mode 100644 index 0000000..b65da8c --- /dev/null +++ b/Advance_Java_Assignment/build/web/User_home.jsp @@ -0,0 +1,60 @@ + + + + + + + +
+
+
+
+ Show Data + Search User + Delete User + Update + Logout + +
+
+
+
+ +
+ <% + String email = (String) session.getAttribute("email"); + %> +

Welcome , <%=email%>

+
+
+ Welcome to the Java Web Application, This application performed all crud operation and have also have functionality of session management with customized web View. + +
+ + +
+
+
 
+
+
+ + \ No newline at end of file diff --git a/Advance_Java_Assignment/build/web/WEB-INF/classes/.netbeans_automatic_build b/Advance_Java_Assignment/build/web/WEB-INF/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/Advance_Java_Assignment/build/web/WEB-INF/classes/.netbeans_update_resources b/Advance_Java_Assignment/build/web/WEB-INF/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/Advance_Java_Assignment/build/web/WEB-INF/classes/Connection/GetConnection.class b/Advance_Java_Assignment/build/web/WEB-INF/classes/Connection/GetConnection.class new file mode 100644 index 0000000..41eba5a Binary files /dev/null and b/Advance_Java_Assignment/build/web/WEB-INF/classes/Connection/GetConnection.class differ diff --git a/Advance_Java_Assignment/build/web/WEB-INF/classes/DAO/userdao.class b/Advance_Java_Assignment/build/web/WEB-INF/classes/DAO/userdao.class new file mode 100644 index 0000000..25558ad Binary files /dev/null and b/Advance_Java_Assignment/build/web/WEB-INF/classes/DAO/userdao.class differ diff --git a/Advance_Java_Assignment/build/web/WEB-INF/classes/DTO/userdto.class b/Advance_Java_Assignment/build/web/WEB-INF/classes/DTO/userdto.class new file mode 100644 index 0000000..efe6344 Binary files /dev/null and b/Advance_Java_Assignment/build/web/WEB-INF/classes/DTO/userdto.class differ diff --git a/Advance_Java_Assignment/build/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar b/Advance_Java_Assignment/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/Advance_Java_Assignment/build/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar differ diff --git a/Advance_Java_Assignment/build/web/delete_info.jsp b/Advance_Java_Assignment/build/web/delete_info.jsp new file mode 100644 index 0000000..0359cd3 --- /dev/null +++ b/Advance_Java_Assignment/build/web/delete_info.jsp @@ -0,0 +1,185 @@ + + + + + + + + + + + + + +
+
Delete User
+
+
+
+
+ Email + +
+
+ First Name + +
+
+
+ +
+
+
+
+ + + diff --git a/Advance_Java_Assignment/build/web/delete_info_db.jsp b/Advance_Java_Assignment/build/web/delete_info_db.jsp new file mode 100644 index 0000000..55b356c --- /dev/null +++ b/Advance_Java_Assignment/build/web/delete_info_db.jsp @@ -0,0 +1,15 @@ +<%@page import="DAO.userdao" %> +<% + String email = request.getParameter("email"); + String fname = request.getParameter("fname"); + userdao rd = new userdao(); + int i = rd.delete(email, fname); + if (i > 0) { +// session.setAttribute("email", email); +%> + + +<%} else {%> + + +<%}%> \ No newline at end of file diff --git a/Advance_Java_Assignment/build/web/index.jsp b/Advance_Java_Assignment/build/web/index.jsp new file mode 100644 index 0000000..901165e --- /dev/null +++ b/Advance_Java_Assignment/build/web/index.jsp @@ -0,0 +1,70 @@ + + + + + + + INDEX + + + + + +

Advance Java Assignment

+ + + diff --git a/Advance_Java_Assignment/build/web/login.jsp b/Advance_Java_Assignment/build/web/login.jsp new file mode 100644 index 0000000..bbd10c9 --- /dev/null +++ b/Advance_Java_Assignment/build/web/login.jsp @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + +
+
Login
+
+
+
+
+ Email + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + diff --git a/Advance_Java_Assignment/build/web/logout.jsp b/Advance_Java_Assignment/build/web/logout.jsp new file mode 100644 index 0000000..d7c67b1 --- /dev/null +++ b/Advance_Java_Assignment/build/web/logout.jsp @@ -0,0 +1,7 @@ +<% + session.invalidate(); +response.setHeader("Cache-Control","no-cache,no-store"); +response.sendRedirect("index.jsp"); + + +%>s diff --git a/Advance_Java_Assignment/build/web/pexels-alexandre-p-junior-7736177.jpg b/Advance_Java_Assignment/build/web/pexels-alexandre-p-junior-7736177.jpg new file mode 100644 index 0000000..9e5f6fa Binary files /dev/null and b/Advance_Java_Assignment/build/web/pexels-alexandre-p-junior-7736177.jpg differ diff --git a/Advance_Java_Assignment/build/web/register.jsp b/Advance_Java_Assignment/build/web/register.jsp new file mode 100644 index 0000000..6127d69 --- /dev/null +++ b/Advance_Java_Assignment/build/web/register.jsp @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + +
+
Registration
+
+
+
+
+ First Name + +
+
+ Last Name + +
+
+ Email + +
+
+ Address + +
+
+ City + +
+
+ State + +
+
+ Country + +
+
+ Zip + +
+
+ Phone + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + diff --git a/Advance_Java_Assignment/build/web/search_info.jsp b/Advance_Java_Assignment/build/web/search_info.jsp new file mode 100644 index 0000000..e3a42dc --- /dev/null +++ b/Advance_Java_Assignment/build/web/search_info.jsp @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + <% + String email = (String) session.getAttribute("email"); + %> + +
+
Find User
+
+
+
+
+ Email + required > +
+
+ First Name + +
+
+
+ +
+
+
+
+ + + diff --git a/Advance_Java_Assignment/build/web/search_info_db.jsp b/Advance_Java_Assignment/build/web/search_info_db.jsp new file mode 100644 index 0000000..10cc845 --- /dev/null +++ b/Advance_Java_Assignment/build/web/search_info_db.jsp @@ -0,0 +1,196 @@ + +<%@page import="DAO.userdao" %> +<%@page import="java.util.*"%> +<%@page import="DTO.userdto" %> + + +<% + String email = request.getParameter("email"); + String fname = request.getParameter("fname"); + userdao rd = new userdao(); + List list = rd.searchinfo(email, fname); + if (list != null) { +// session.setAttribute("email", email); +%> + +<%----%> + + + + +
+ + +
+
+

List

+
+ + + + + + + + + + + + + + + + + + <% + // userdao ad = new userdao(); + // List list = ad.getList(); + for (userdto rt : list) { + %> + + + + + + + + + + + + <%}%> + + +
First Name
Id
last NameEmailAddressCityStateCountryZipPhone
<%=rt.getFname()%><%=rt.getLname()%><%=rt.getEmail()%><%=rt.getAddress()%><%=rt.getCity()%><%=rt.getState()%><%=rt.getCountry()%><%=rt.getZip()%><%=rt.getPhone()%>
+
+ +
+
+ +
+ +
+ + + <%} else {%> + + <%----%> + <%}%> diff --git a/Advance_Java_Assignment/build/web/showdata.jsp b/Advance_Java_Assignment/build/web/showdata.jsp new file mode 100644 index 0000000..8534bfb --- /dev/null +++ b/Advance_Java_Assignment/build/web/showdata.jsp @@ -0,0 +1,184 @@ +<%@page import="java.util.*"%> +<%@page import="DAO.userdao"%> +<%@page import="DTO.userdto"%> + + + + + + + + +
+ +
+
+

List

+
+ + + + + + + + + + + + + + + + + + + + <% + userdao ad = new userdao(); + List list = ad.getList(); + for (userdto rt : list) { + %> + + + + + + + + + + + + <%}%> + + +
First Name
Id
last NameEmailAddressCityStateCountryZipPhone
<%=rt.getFname()%><%=rt.getLname()%><%=rt.getEmail()%><%=rt.getAddress()%><%=rt.getCity()%><%=rt.getState()%><%=rt.getCountry()%><%=rt.getZip()%><%=rt.getPhone()%>
+
+ +
+
+
+
+
+ + diff --git a/Advance_Java_Assignment/build/web/update_info.jsp b/Advance_Java_Assignment/build/web/update_info.jsp new file mode 100644 index 0000000..2c3f4aa --- /dev/null +++ b/Advance_Java_Assignment/build/web/update_info.jsp @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + <% + String email = (String) session.getAttribute("email"); + %> + + + +
+
Update
+
+
+
+
+ First Name + +
+
+ Last Name + +
+
+ Email + required> +
+
+ Address + +
+
+ City + +
+
+ State + +
+
+ Country + +
+
+ Zip + +
+
+ Phone + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + + + + + + diff --git a/Advance_Java_Assignment/build/web/update_info_db.jsp b/Advance_Java_Assignment/build/web/update_info_db.jsp new file mode 100644 index 0000000..e3cbc3a --- /dev/null +++ b/Advance_Java_Assignment/build/web/update_info_db.jsp @@ -0,0 +1,19 @@ +<%@page import="DAO.userdao" %> + + + +<% + String email = (String) session.getAttribute("email"); + userdao cd = new userdao(); + int i = cd.updateinfo(obj,email); + if (i == 2) { +%> + + +<%} else if (i > 0) {%> + + +<%} else {%> + + +<%}%> \ No newline at end of file diff --git a/Advance_Java_Assignment/build/web/userlogin_db.jsp b/Advance_Java_Assignment/build/web/userlogin_db.jsp new file mode 100644 index 0000000..2066b59 --- /dev/null +++ b/Advance_Java_Assignment/build/web/userlogin_db.jsp @@ -0,0 +1,15 @@ +<%@page import="DAO.userdao" %> +<% + String email = request.getParameter("email"); + String password = request.getParameter("password"); + userdao rd = new userdao(); + int i = rd.userLogin(email, password); + if (i > 0) { + session.setAttribute("email", email); +%> + + +<%} else {%> + + +<%}%> \ No newline at end of file diff --git a/Advance_Java_Assignment/build/web/userregister_db.jsp b/Advance_Java_Assignment/build/web/userregister_db.jsp new file mode 100644 index 0000000..5b43929 --- /dev/null +++ b/Advance_Java_Assignment/build/web/userregister_db.jsp @@ -0,0 +1,18 @@ +<%@page import="DAO.userdao" %> + + + +<% + userdao cd = new userdao(); + int i = cd.adduser(obj); + if (i == 2) { +%> + + +<%} else if (i > 0) {%> + + +<%} else {%> + + +<%}%> \ No newline at end of file diff --git a/Advance_Java_Assignment/build/web/wallpaper2you_166375.jpg b/Advance_Java_Assignment/build/web/wallpaper2you_166375.jpg new file mode 100644 index 0000000..62de53d Binary files /dev/null and b/Advance_Java_Assignment/build/web/wallpaper2you_166375.jpg differ diff --git a/Advance_Java_Assignment/nbproject/ant-deploy.xml b/Advance_Java_Assignment/nbproject/ant-deploy.xml new file mode 100644 index 0000000..55566c8 --- /dev/null +++ b/Advance_Java_Assignment/nbproject/ant-deploy.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Advance_Java_Assignment/nbproject/build-impl.xml b/Advance_Java_Assignment/nbproject/build-impl.xml new file mode 100644 index 0000000..6180155 --- /dev/null +++ b/Advance_Java_Assignment/nbproject/build-impl.xml @@ -0,0 +1,1444 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/Advance_Java_Assignment/nbproject/genfiles.properties b/Advance_Java_Assignment/nbproject/genfiles.properties new file mode 100644 index 0000000..43cd033 --- /dev/null +++ b/Advance_Java_Assignment/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=273c9cae +build.xml.script.CRC32=35258c59 +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=273c9cae +nbproject/build-impl.xml.script.CRC32=4ca6bc2f +nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1 diff --git a/Advance_Java_Assignment/nbproject/private/private.properties b/Advance_Java_Assignment/nbproject/private/private.properties new file mode 100644 index 0000000..11bcc63 --- /dev/null +++ b/Advance_Java_Assignment/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/Advance_Java_Assignment/nbproject/private/private.xml b/Advance_Java_Assignment/nbproject/private/private.xml new file mode 100644 index 0000000..86343da --- /dev/null +++ b/Advance_Java_Assignment/nbproject/private/private.xml @@ -0,0 +1,27 @@ + + + + + + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/src/conf/MANIFEST.MF + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/delete_info.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/userregister_db.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/userlogin_db.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/src/java/DTO/userdto.java + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/update_info_db.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/search_info_db.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/search_info.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/src/java/DAO/userdao.java + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/src/java/Connection/GetConnection.java + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/User_home.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/update_info.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/showdata.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/META-INF/context.xml + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/register.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/delete_info_db.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/logout.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/index.jsp + file:/C:/Users/HP/Documents/NetBeansProjects/Advance_Java_Assignment/web/login.jsp + + + diff --git a/Advance_Java_Assignment/nbproject/project.properties b/Advance_Java_Assignment/nbproject/project.properties new file mode 100644 index 0000000..4ac007e --- /dev/null +++ b/Advance_Java_Assignment/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=Advance_Java_Assignment.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/Advance_Java_Assignment/nbproject/project.xml b/Advance_Java_Assignment/nbproject/project.xml new file mode 100644 index 0000000..c920117 --- /dev/null +++ b/Advance_Java_Assignment/nbproject/project.xml @@ -0,0 +1,23 @@ + + + org.netbeans.modules.web.project + + + Advance_Java_Assignment + 1.6.5 + + + ${libs.MySQLDriver.classpath} + WEB-INF/lib + + + + + + + + + + + + diff --git a/Advance_Java_Assignment/src/conf/MANIFEST.MF b/Advance_Java_Assignment/src/conf/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/Advance_Java_Assignment/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/Advance_Java_Assignment/src/java/Connection/GetConnection.java b/Advance_Java_Assignment/src/java/Connection/GetConnection.java new file mode 100644 index 0000000..e884bc3 --- /dev/null +++ b/Advance_Java_Assignment/src/java/Connection/GetConnection.java @@ -0,0 +1,22 @@ +package Connection; + +import java.sql.*; + +public class GetConnection { + + private final static String Driver = "com.mysql.jdbc.Driver"; + private final static String URL = "jdbc:mysql://localhost:3306/assignment_db"; + private final static String USER = "root"; + private final static String PASS = "root"; + + public static Connection getConnect() { + Connection con = null; + try { + Class.forName(Driver); + con = DriverManager.getConnection(URL, USER, PASS); + } catch (ClassNotFoundException | SQLException e) { + System.out.println("Exception : " + e); + } + return con; + } +} diff --git a/Advance_Java_Assignment/src/java/DAO/userdao.java b/Advance_Java_Assignment/src/java/DAO/userdao.java new file mode 100644 index 0000000..581e894 --- /dev/null +++ b/Advance_Java_Assignment/src/java/DAO/userdao.java @@ -0,0 +1,143 @@ +package DAO; + +import DTO.userdto; +import java.sql.SQLException; +import java.sql.*; +import java.util.ArrayList; +import java.util.List; +import Connection.GetConnection; + +public class userdao { + + public List getList() throws SQLException { + List list = new ArrayList<>(); + Connection con = GetConnection.getConnect(); + String query = "select * from usere"; + PreparedStatement ps = con.prepareStatement(query); + ResultSet rs = ps.executeQuery(); + while (rs.next()) { + +// + userdto v = new userdto(); + + v.setFname(rs.getString(1)); + v.setLname(rs.getString(2)); + v.setEmail(rs.getString(3)); + v.setAddress(rs.getString(4)); + v.setCity(rs.getString(5)); + v.setState(rs.getString(6)); + v.setCountry(rs.getString(7)); + v.setZip(rs.getString(8)); + v.setPhone(rs.getString(9)); +// v.setPassword(rs.getString(9)); + + list.add(v); + } + return list; + } + //////////////////////////////////////////////////////////////////////////////////////// + + public List searchinfo(String email, String fname) throws SQLException { + List list = new ArrayList<>(); +// int i =0; + Connection con = GetConnection.getConnect(); + String query = "select * from usere where email=? and fname=? "; +// String query = "select * from usere where email=email and fname"; + + PreparedStatement ps = con.prepareStatement(query); + ps.setString(1, email); + ps.setString(2, fname); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + +// + userdto v = new userdto(); + + v.setFname(rs.getString(1)); + v.setLname(rs.getString(2)); + v.setEmail(rs.getString(3)); + v.setAddress(rs.getString(4)); + v.setCity(rs.getString(5)); + v.setState(rs.getString(6)); + v.setCountry(rs.getString(7)); + v.setZip(rs.getString(8)); + v.setPhone(rs.getString(9)); +// v.setPassword(rs.getString(9)); + + list.add(v); + } + return list; + } + + ///////////////////////////////////////////////////////////////////////////////////// + public int adduser(userdto obj) throws SQLException { + Connection con = GetConnection.getConnect(); + String query = "insert into usere(fname,lname,email,address,city,state,country,zip,phone,password) values(?,?,?,?,?,?,?,?,?,?)"; + PreparedStatement ps = con.prepareStatement(query); + ps.setString(1, obj.getFname()); + ps.setString(2, obj.getLname()); + ps.setString(3, obj.getEmail()); + ps.setString(4, obj.getAddress()); + ps.setString(5, obj.getCity()); + ps.setString(6, obj.getState()); + ps.setString(7, obj.getCountry()); + ps.setString(8, obj.getZip()); + ps.setString(9, obj.getPhone()); + ps.setString(10, obj.getPassword()); + int i = ps.executeUpdate(); + return i; + } + + public int userLogin(String email, String password) throws SQLException { + int i = 0; + Connection con = GetConnection.getConnect(); + String query = "select * from usere where email=? and password=?"; + PreparedStatement ps = con.prepareStatement(query); + ps.setString(1, email); + ps.setString(2, password); + + ResultSet rs = ps.executeQuery(); + if (rs.next()) { + i = 1; + } + con.close(); + return i; + } + + ///////////////////////////////////////////////////////////////////////////// + public int delete(String email, String fname) throws SQLException { + int i = 0; + Connection con = GetConnection.getConnect(); + String query = "delete from usere where email=? and fname=?"; + PreparedStatement ps = con.prepareStatement(query); + ps.setString(1, email); + ps.setString(2, fname); + +// ResultSet rs = + if (ps.executeUpdate() > 0) { + i = 1; + } + con.close(); + return i; + } + ////////////////////////////////////////////////////// + +public int updateinfo(userdto obj, String email) throws SQLException { + Connection con = GetConnection.getConnect(); + String query = "update usere set fname = ?,lname= ?,address= ?,city= ?,state= ?,country= ?,zip= ?,phone= ?,password = ? where email= ? "; + PreparedStatement ps = con.prepareStatement(query); + ps.setString(1, obj.getFname()); + ps.setString(2, obj.getLname()); + ps.setString(3, obj.getAddress()); + ps.setString(4, obj.getCity()); + ps.setString(5, obj.getState()); + ps.setString(6, obj.getCountry()); + ps.setString(7, obj.getZip()); + ps.setString(8, obj.getPhone()); + ps.setString(9, obj.getPassword()); + ps.setString(10, email); + int i = ps.executeUpdate(); + return i; + } +} diff --git a/Advance_Java_Assignment/src/java/DTO/userdto.java b/Advance_Java_Assignment/src/java/DTO/userdto.java new file mode 100644 index 0000000..85e8195 --- /dev/null +++ b/Advance_Java_Assignment/src/java/DTO/userdto.java @@ -0,0 +1,105 @@ +package DTO; + +import java.io.Serializable; + +public class userdto implements Serializable { + + private String fname, lname, email, address, city, state, country, zip, phone, password; + + public userdto(String fname, String lname, String email, String address, String city, String state, String country, String zip, String phone, String password) { + this.fname = fname; + this.lname = lname; + this.email = email; + this.address = address; + this.city = city; + this.state = state; + this.country = country; + this.zip = zip; + this.phone = phone; + this.password = password; + } + + public userdto() { + } + + 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 String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + +} diff --git a/Advance_Java_Assignment/web/BG1.jpg b/Advance_Java_Assignment/web/BG1.jpg new file mode 100644 index 0000000..5f3571e Binary files /dev/null and b/Advance_Java_Assignment/web/BG1.jpg differ diff --git a/Advance_Java_Assignment/web/BG2.webp b/Advance_Java_Assignment/web/BG2.webp new file mode 100644 index 0000000..d6ba45d Binary files /dev/null and b/Advance_Java_Assignment/web/BG2.webp differ diff --git a/Advance_Java_Assignment/web/META-INF/context.xml b/Advance_Java_Assignment/web/META-INF/context.xml new file mode 100644 index 0000000..c3c272e --- /dev/null +++ b/Advance_Java_Assignment/web/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/Advance_Java_Assignment/web/PNG1.png b/Advance_Java_Assignment/web/PNG1.png new file mode 100644 index 0000000..63c7912 Binary files /dev/null and b/Advance_Java_Assignment/web/PNG1.png differ diff --git a/Advance_Java_Assignment/web/User_home.jsp b/Advance_Java_Assignment/web/User_home.jsp new file mode 100644 index 0000000..b65da8c --- /dev/null +++ b/Advance_Java_Assignment/web/User_home.jsp @@ -0,0 +1,60 @@ + + + + + + + +
+
+
+
+ Show Data + Search User + Delete User + Update + Logout + +
+
+
+
+ +
+ <% + String email = (String) session.getAttribute("email"); + %> +

Welcome , <%=email%>

+
+
+ Welcome to the Java Web Application, This application performed all crud operation and have also have functionality of session management with customized web View. + +
+ + +
+
+
 
+
+
+ + \ No newline at end of file diff --git a/Advance_Java_Assignment/web/delete_info.jsp b/Advance_Java_Assignment/web/delete_info.jsp new file mode 100644 index 0000000..0359cd3 --- /dev/null +++ b/Advance_Java_Assignment/web/delete_info.jsp @@ -0,0 +1,185 @@ + + + + + + + + + + + + + +
+
Delete User
+
+
+
+
+ Email + +
+
+ First Name + +
+
+
+ +
+
+
+
+ + + diff --git a/Advance_Java_Assignment/web/delete_info_db.jsp b/Advance_Java_Assignment/web/delete_info_db.jsp new file mode 100644 index 0000000..55b356c --- /dev/null +++ b/Advance_Java_Assignment/web/delete_info_db.jsp @@ -0,0 +1,15 @@ +<%@page import="DAO.userdao" %> +<% + String email = request.getParameter("email"); + String fname = request.getParameter("fname"); + userdao rd = new userdao(); + int i = rd.delete(email, fname); + if (i > 0) { +// session.setAttribute("email", email); +%> + + +<%} else {%> + + +<%}%> \ No newline at end of file diff --git a/Advance_Java_Assignment/web/index.jsp b/Advance_Java_Assignment/web/index.jsp new file mode 100644 index 0000000..901165e --- /dev/null +++ b/Advance_Java_Assignment/web/index.jsp @@ -0,0 +1,70 @@ + + + + + + + INDEX + + + + + +

Advance Java Assignment

+ + + diff --git a/Advance_Java_Assignment/web/login.jsp b/Advance_Java_Assignment/web/login.jsp new file mode 100644 index 0000000..bbd10c9 --- /dev/null +++ b/Advance_Java_Assignment/web/login.jsp @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + +
+
Login
+
+
+
+
+ Email + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + diff --git a/Advance_Java_Assignment/web/logout.jsp b/Advance_Java_Assignment/web/logout.jsp new file mode 100644 index 0000000..d7c67b1 --- /dev/null +++ b/Advance_Java_Assignment/web/logout.jsp @@ -0,0 +1,7 @@ +<% + session.invalidate(); +response.setHeader("Cache-Control","no-cache,no-store"); +response.sendRedirect("index.jsp"); + + +%>s diff --git a/Advance_Java_Assignment/web/pexels-alexandre-p-junior-7736177.jpg b/Advance_Java_Assignment/web/pexels-alexandre-p-junior-7736177.jpg new file mode 100644 index 0000000..9e5f6fa Binary files /dev/null and b/Advance_Java_Assignment/web/pexels-alexandre-p-junior-7736177.jpg differ diff --git a/Advance_Java_Assignment/web/register.jsp b/Advance_Java_Assignment/web/register.jsp new file mode 100644 index 0000000..6127d69 --- /dev/null +++ b/Advance_Java_Assignment/web/register.jsp @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + +
+
Registration
+
+
+
+
+ First Name + +
+
+ Last Name + +
+
+ Email + +
+
+ Address + +
+
+ City + +
+
+ State + +
+
+ Country + +
+
+ Zip + +
+
+ Phone + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + diff --git a/Advance_Java_Assignment/web/search_info.jsp b/Advance_Java_Assignment/web/search_info.jsp new file mode 100644 index 0000000..e3a42dc --- /dev/null +++ b/Advance_Java_Assignment/web/search_info.jsp @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + <% + String email = (String) session.getAttribute("email"); + %> + +
+
Find User
+
+
+
+
+ Email + required > +
+
+ First Name + +
+
+
+ +
+
+
+
+ + + diff --git a/Advance_Java_Assignment/web/search_info_db.jsp b/Advance_Java_Assignment/web/search_info_db.jsp new file mode 100644 index 0000000..10cc845 --- /dev/null +++ b/Advance_Java_Assignment/web/search_info_db.jsp @@ -0,0 +1,196 @@ + +<%@page import="DAO.userdao" %> +<%@page import="java.util.*"%> +<%@page import="DTO.userdto" %> + + +<% + String email = request.getParameter("email"); + String fname = request.getParameter("fname"); + userdao rd = new userdao(); + List list = rd.searchinfo(email, fname); + if (list != null) { +// session.setAttribute("email", email); +%> + +<%----%> + + + + +
+ + +
+
+

List

+
+ + + + + + + + + + + + + + + + + + <% + // userdao ad = new userdao(); + // List list = ad.getList(); + for (userdto rt : list) { + %> + + + + + + + + + + + + <%}%> + + +
First Name
Id
last NameEmailAddressCityStateCountryZipPhone
<%=rt.getFname()%><%=rt.getLname()%><%=rt.getEmail()%><%=rt.getAddress()%><%=rt.getCity()%><%=rt.getState()%><%=rt.getCountry()%><%=rt.getZip()%><%=rt.getPhone()%>
+
+ +
+
+ +
+ +
+ + + <%} else {%> + + <%----%> + <%}%> diff --git a/Advance_Java_Assignment/web/showdata.jsp b/Advance_Java_Assignment/web/showdata.jsp new file mode 100644 index 0000000..8534bfb --- /dev/null +++ b/Advance_Java_Assignment/web/showdata.jsp @@ -0,0 +1,184 @@ +<%@page import="java.util.*"%> +<%@page import="DAO.userdao"%> +<%@page import="DTO.userdto"%> + + + + + + + + +
+ +
+
+

List

+
+ + + + + + + + + + + + + + + + + + + + <% + userdao ad = new userdao(); + List list = ad.getList(); + for (userdto rt : list) { + %> + + + + + + + + + + + + <%}%> + + +
First Name
Id
last NameEmailAddressCityStateCountryZipPhone
<%=rt.getFname()%><%=rt.getLname()%><%=rt.getEmail()%><%=rt.getAddress()%><%=rt.getCity()%><%=rt.getState()%><%=rt.getCountry()%><%=rt.getZip()%><%=rt.getPhone()%>
+
+ +
+
+
+
+
+ + diff --git a/Advance_Java_Assignment/web/update_info.jsp b/Advance_Java_Assignment/web/update_info.jsp new file mode 100644 index 0000000..2c3f4aa --- /dev/null +++ b/Advance_Java_Assignment/web/update_info.jsp @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + <% + String email = (String) session.getAttribute("email"); + %> + + + +
+
Update
+
+
+
+
+ First Name + +
+
+ Last Name + +
+
+ Email + required> +
+
+ Address + +
+
+ City + +
+
+ State + +
+
+ Country + +
+
+ Zip + +
+
+ Phone + +
+
+ Password + +
+
+
+ +
+
+
+
+ + + + + + + + diff --git a/Advance_Java_Assignment/web/update_info_db.jsp b/Advance_Java_Assignment/web/update_info_db.jsp new file mode 100644 index 0000000..e3cbc3a --- /dev/null +++ b/Advance_Java_Assignment/web/update_info_db.jsp @@ -0,0 +1,19 @@ +<%@page import="DAO.userdao" %> + + + +<% + String email = (String) session.getAttribute("email"); + userdao cd = new userdao(); + int i = cd.updateinfo(obj,email); + if (i == 2) { +%> + + +<%} else if (i > 0) {%> + + +<%} else {%> + + +<%}%> \ No newline at end of file diff --git a/Advance_Java_Assignment/web/userlogin_db.jsp b/Advance_Java_Assignment/web/userlogin_db.jsp new file mode 100644 index 0000000..2066b59 --- /dev/null +++ b/Advance_Java_Assignment/web/userlogin_db.jsp @@ -0,0 +1,15 @@ +<%@page import="DAO.userdao" %> +<% + String email = request.getParameter("email"); + String password = request.getParameter("password"); + userdao rd = new userdao(); + int i = rd.userLogin(email, password); + if (i > 0) { + session.setAttribute("email", email); +%> + + +<%} else {%> + + +<%}%> \ No newline at end of file diff --git a/Advance_Java_Assignment/web/userregister_db.jsp b/Advance_Java_Assignment/web/userregister_db.jsp new file mode 100644 index 0000000..5b43929 --- /dev/null +++ b/Advance_Java_Assignment/web/userregister_db.jsp @@ -0,0 +1,18 @@ +<%@page import="DAO.userdao" %> + + + +<% + userdao cd = new userdao(); + int i = cd.adduser(obj); + if (i == 2) { +%> + + +<%} else if (i > 0) {%> + + +<%} else {%> + + +<%}%> \ No newline at end of file diff --git a/Advance_Java_Assignment/web/wallpaper2you_166375.jpg b/Advance_Java_Assignment/web/wallpaper2you_166375.jpg new file mode 100644 index 0000000..62de53d Binary files /dev/null and b/Advance_Java_Assignment/web/wallpaper2you_166375.jpg differ diff --git a/README.md b/README.md index e5d4536..c407318 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# core_Java_Assingment- \ No newline at end of file +# Advance Java Assignment \ No newline at end of file