diff --git a/ABC AIRCRAFT/build.xml b/ABC AIRCRAFT/build.xml new file mode 100644 index 0000000..4b718e9 --- /dev/null +++ b/ABC AIRCRAFT/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project ABC AIRCRAFT. + + + diff --git a/ABC AIRCRAFT/build/web/META-INF/MANIFEST.MF b/ABC AIRCRAFT/build/web/META-INF/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/ABC AIRCRAFT/build/web/META-INF/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/ABC AIRCRAFT/build/web/WEB-INF/classes/.netbeans_automatic_build b/ABC AIRCRAFT/build/web/WEB-INF/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/ABC AIRCRAFT/build/web/WEB-INF/classes/.netbeans_update_resources b/ABC AIRCRAFT/build/web/WEB-INF/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/ABC AIRCRAFT/build/web/WEB-INF/classes/META-INF/persistence.xml b/ABC AIRCRAFT/build/web/WEB-INF/classes/META-INF/persistence.xml new file mode 100644 index 0000000..b11b056 --- /dev/null +++ b/ABC AIRCRAFT/build/web/WEB-INF/classes/META-INF/persistence.xml @@ -0,0 +1,10 @@ + + + + jdbc/__default + false + + + + + diff --git a/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/LoginDaoClass.class b/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/LoginDaoClass.class new file mode 100644 index 0000000..c1219c9 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/LoginDaoClass.class differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/LoginEntity.class b/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/LoginEntity.class new file mode 100644 index 0000000..10e6c01 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/LoginEntity.class differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/LoginEntity_.class b/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/LoginEntity_.class new file mode 100644 index 0000000..2510687 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/LoginEntity_.class differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/SessionClass.class b/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/SessionClass.class new file mode 100644 index 0000000..ea4eccb Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/SessionClass.class differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/loginServlet.class b/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/loginServlet.class new file mode 100644 index 0000000..0eccb41 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/classes/com/login/loginServlet.class differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/classes/login.cfg.xml b/ABC AIRCRAFT/build/web/WEB-INF/classes/login.cfg.xml new file mode 100644 index 0000000..b458b33 --- /dev/null +++ b/ABC AIRCRAFT/build/web/WEB-INF/classes/login.cfg.xml @@ -0,0 +1,46 @@ + + + + + + + + diff --git a/ABC AIRCRAFT/build/web/WEB-INF/glassfish-web.xml b/ABC AIRCRAFT/build/web/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..f5b9088 --- /dev/null +++ b/ABC AIRCRAFT/build/web/WEB-INF/glassfish-web.xml @@ -0,0 +1,11 @@ + + + + /ABC_AIRCRAFT + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/antlr-2.7.7.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/antlr-2.7.7.jar new file mode 100644 index 0000000..2bc7ef7 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/antlr-2.7.7.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/c3p0-0.9.2.1.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/c3p0-0.9.2.1.jar new file mode 100644 index 0000000..6ecc355 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/c3p0-0.9.2.1.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/dom4j-1.6.1.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/dom4j-1.6.1.jar new file mode 100644 index 0000000..3acf05e Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/dom4j-1.6.1.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/ehcache-core-2.4.3.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/ehcache-core-2.4.3.jar new file mode 100644 index 0000000..b7a76a8 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/ehcache-core-2.4.3.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-c3p0-4.3.1.Final.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-c3p0-4.3.1.Final.jar new file mode 100644 index 0000000..1ebcffe Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-c3p0-4.3.1.Final.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-commons-annotations-4.0.4.Final.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-commons-annotations-4.0.4.Final.jar new file mode 100644 index 0000000..3c1ac3b Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-commons-annotations-4.0.4.Final.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-core-4.3.1.Final.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-core-4.3.1.Final.jar new file mode 100644 index 0000000..ed1ed46 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-core-4.3.1.Final.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-ehcache-4.3.1.Final.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-ehcache-4.3.1.Final.jar new file mode 100644 index 0000000..c51e5fc Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-ehcache-4.3.1.Final.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-entitymanager-4.3.1.Final.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-entitymanager-4.3.1.Final.jar new file mode 100644 index 0000000..f001781 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/hibernate-entitymanager-4.3.1.Final.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/javassist-3.18.1-GA.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/javassist-3.18.1-GA.jar new file mode 100644 index 0000000..cd1d632 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/javassist-3.18.1-GA.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/jboss-logging-3.1.3.GA.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/jboss-logging-3.1.3.GA.jar new file mode 100644 index 0000000..7a36dbe Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/jboss-logging-3.1.3.GA.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar new file mode 100644 index 0000000..264b648 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.0.Final.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/mchange-commons-java-0.2.3.4.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/mchange-commons-java-0.2.3.4.jar new file mode 100644 index 0000000..98e9587 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/mchange-commons-java-0.2.3.4.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/slf4j-api-1.6.1.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/slf4j-api-1.6.1.jar new file mode 100644 index 0000000..c276448 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/slf4j-api-1.6.1.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/lib/slf4j-simple-1.6.1.jar b/ABC AIRCRAFT/build/web/WEB-INF/lib/slf4j-simple-1.6.1.jar new file mode 100644 index 0000000..a24dbe6 Binary files /dev/null and b/ABC AIRCRAFT/build/web/WEB-INF/lib/slf4j-simple-1.6.1.jar differ diff --git a/ABC AIRCRAFT/build/web/WEB-INF/web.xml b/ABC AIRCRAFT/build/web/WEB-INF/web.xml new file mode 100644 index 0000000..a5ce0df --- /dev/null +++ b/ABC AIRCRAFT/build/web/WEB-INF/web.xml @@ -0,0 +1,33 @@ + + + + javax.faces.PROJECT_STAGE + Development + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + loginServlet + com.login.loginServlet + + + Faces Servlet + /faces/* + + + loginServlet + /loginServlet + + + + 30 + + + + faces/index.xhtml + index.html + + diff --git a/ABC AIRCRAFT/build/web/edit.jsp b/ABC AIRCRAFT/build/web/edit.jsp new file mode 100644 index 0000000..7732305 --- /dev/null +++ b/ABC AIRCRAFT/build/web/edit.jsp @@ -0,0 +1,12 @@ +<%@page import="com.login.SessionClass"contentType="text/html" pageEncoding="UTF-8"%> + + + + + + +<% +int i=SessionClass.update(u); +response.sendRedirect("view.jsp"); +%> + diff --git a/ABC AIRCRAFT/build/web/editform.jsp b/ABC AIRCRAFT/build/web/editform.jsp new file mode 100644 index 0000000..b219d3d --- /dev/null +++ b/ABC AIRCRAFT/build/web/editform.jsp @@ -0,0 +1,40 @@ + +<%@page import="java.util.List"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + ABC AIRCRAFT SERVICE + + + <%@page import="com.login.SessionClass,com.login.LoginEntity"%> + +<% +int id = Integer.parseInt(request.getParameter("id")); +LoginEntity loginEntity= SessionClass.getRecordById(id); +%> +

Edit Form

+
+ +Id: + +Name: + +Age: + +Manufacture Year: + +Aircraft Type: + +Running Hours: + +Maintenance Scheduled/Unscheduled: + + + +
+ + + + diff --git a/ABC AIRCRAFT/build/web/gfv3ee6.dpf b/ABC AIRCRAFT/build/web/gfv3ee6.dpf new file mode 100644 index 0000000..f5b9088 --- /dev/null +++ b/ABC AIRCRAFT/build/web/gfv3ee6.dpf @@ -0,0 +1,11 @@ + + + + /ABC_AIRCRAFT + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/ABC AIRCRAFT/build/web/index.html b/ABC AIRCRAFT/build/web/index.html new file mode 100644 index 0000000..24190e0 --- /dev/null +++ b/ABC AIRCRAFT/build/web/index.html @@ -0,0 +1,21 @@ + + + + + ABC AIRCRAFT SERVICE + + + + +

ABC AIRCRAFT SERVICE

+ + +
+ +USER ID :

+PASSWORD :

+ + +
+ + diff --git a/ABC AIRCRAFT/build/web/login.jsp b/ABC AIRCRAFT/build/web/login.jsp new file mode 100644 index 0000000..83de42e --- /dev/null +++ b/ABC AIRCRAFT/build/web/login.jsp @@ -0,0 +1,46 @@ +<%-- + Document : login + Created on : 31-Dec-2021, 19:41:04 + Author : hp +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%> +<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%> + + + + + ABC AIRCRAFT SERVICE + + + + + +
+ + + + + + + + + + + + + + + + + + +
AIRCRAFT NUMBER
AIRCRAFT NAME
AGE
MANUFATURE YEAR
AIRCRAFT TYPE
RUNNING HOURS
MAINTENANCE SCHEDULED/UNSCHEDULED
+ +
+ VIEW USER'S + + + diff --git a/ABC AIRCRAFT/build/web/view.jsp b/ABC AIRCRAFT/build/web/view.jsp new file mode 100644 index 0000000..1daacf1 --- /dev/null +++ b/ABC AIRCRAFT/build/web/view.jsp @@ -0,0 +1,76 @@ +<%@page import="com.login.LoginEntity"%> +<%@page import="com.login.LoginEntity"%> +<%@page import="org.hibernate.cfg.Configuration,java.util.*,org.hibernate.Session,org.hibernate.*,org.hibernate.cfg.*"contentType="text/html" pageEncoding="UTF-8"%> +<%!Session session1=null;Configuration config1 = null;int id;int age;int myear;int time;String name;String type;String schedule;%> + + + + + ABC AIRCRAFT SERVICE + + + + + + + + + + + + + + <% + config1 = new Configuration(); + config1.configure("login.cfg.xml"); + SessionFactory sf = config1.buildSessionFactory(); + session1 = sf.openSession(); + Transaction t = session1.beginTransaction(); + + Query query = session1.createQuery("from LoginEntity"); + List list = (List) query.list(); + for (LoginEntity st : list) { + id = st.getId(); + age =st.getAge(); + name =st.getName(); + myear = st.getMyear(); + type = st.getType(); + time = st.getTime(); + schedule = st.getSchedule(); + System.out.println("assigned"+st.getId()+"," + st.getAge() + "," + + st.getName() + "," + st.getMyear()+ "," + st.getType()+","+st.getTime()+","+st.getSchedule()); + + %> + + + + + + + + + + + + <%} + t.commit(); + session1.close(); + sf.close(); + %> +
AIRCRAFT NUMBERAIRCRAFT NAMEAGEMANUFATURE YEARAIRCRAFT TYPERUNNING HOURSMAINTENANCE SCHEDULED/UNSCHEDULED
<%= id%><%= name%><%= age%><%= myear%><%= type%><%= time%><%= schedule%>EditDELETE
+
+ + diff --git a/ABC AIRCRAFT/nbproject/ant-deploy.xml b/ABC AIRCRAFT/nbproject/ant-deploy.xml new file mode 100644 index 0000000..5d33e0d --- /dev/null +++ b/ABC AIRCRAFT/nbproject/ant-deploy.xml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ABC AIRCRAFT/nbproject/build-impl.xml b/ABC AIRCRAFT/nbproject/build-impl.xml new file mode 100644 index 0000000..2776fa0 --- /dev/null +++ b/ABC AIRCRAFT/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/ABC AIRCRAFT/nbproject/genfiles.properties b/ABC AIRCRAFT/nbproject/genfiles.properties new file mode 100644 index 0000000..55588fa --- /dev/null +++ b/ABC AIRCRAFT/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=9330ee09 +build.xml.script.CRC32=eb5c1256 +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=9330ee09 +nbproject/build-impl.xml.script.CRC32=c692d046 +nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1 diff --git a/ABC AIRCRAFT/nbproject/private/private.properties b/ABC AIRCRAFT/nbproject/private/private.properties new file mode 100644 index 0000000..bb38147 --- /dev/null +++ b/ABC AIRCRAFT/nbproject/private/private.properties @@ -0,0 +1,7 @@ +deploy.ant.properties.file=C:\\Users\\hp\\AppData\\Roaming\\NetBeans\\8.2\\config\\GlassFishEE6\\Properties\\gfv3-2010271361.properties +j2ee.platform.is.jsr109=true +j2ee.server.domain=C:/Users/hp/AppData/Roaming/NetBeans/8.2/config/GF_4.1.1/domain1 +j2ee.server.home=C:/Program Files/glassfish-4.1.1/glassfish +j2ee.server.instance=[C:\\Program Files\\glassfish-4.1.1\\glassfish;C:\\Program Files\\glassfish-4.1.1\\glassfish\\domains\\domain1]deployer:gfv3ee6wc:localhost:4848 +j2ee.server.middleware=C:/Program Files/glassfish-4.1.1 +user.properties.file=C:\\Users\\hp\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/ABC AIRCRAFT/nbproject/private/private.xml b/ABC AIRCRAFT/nbproject/private/private.xml new file mode 100644 index 0000000..e2aeb55 --- /dev/null +++ b/ABC AIRCRAFT/nbproject/private/private.xml @@ -0,0 +1,11 @@ + + + + + + file:/C:/Users/hp/Documents/NetBeansProjects/ABC%20AIRCRAFT/web/editform.jsp + file:/C:/Users/hp/Documents/NetBeansProjects/ABC%20AIRCRAFT/src/java/com/login/LoginEntity.java + file:/C:/Users/hp/Documents/NetBeansProjects/ABC%20AIRCRAFT/web/login.jsp + + + diff --git a/ABC AIRCRAFT/nbproject/project.properties b/ABC AIRCRAFT/nbproject/project.properties new file mode 100644 index 0000000..4a39558 --- /dev/null +++ b/ABC AIRCRAFT/nbproject/project.properties @@ -0,0 +1,94 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processor.options=-Aeclipselink.canonicalmodel.use_static_factory=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +auxiliary.org-netbeans-modules-projectapi.jsf_2e_language=Facelets +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}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/cdi-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsit.classpath= +j2ee.server.type=gfv3ee6 +jar.compress=false +javac.classpath=\ + ${libs.hibernate4-support.classpath} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath}:\ + ${libs.eclipselink.classpath}:\ + ${libs.eclipselinkmodelgen.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=ABC_AIRCRAFT.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/ABC AIRCRAFT/nbproject/project.xml b/ABC AIRCRAFT/nbproject/project.xml new file mode 100644 index 0000000..b43eda1 --- /dev/null +++ b/ABC AIRCRAFT/nbproject/project.xml @@ -0,0 +1,26 @@ + + + org.netbeans.modules.web.project + + + ABC AIRCRAFT + 1.6.5 + + + ${libs.hibernate4-support.classpath} + WEB-INF/lib + + + + + + + + + + + + MANUFATURE + + + diff --git a/ABC AIRCRAFT/src/conf/MANIFEST.MF b/ABC AIRCRAFT/src/conf/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/ABC AIRCRAFT/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/ABC AIRCRAFT/src/conf/persistence.xml b/ABC AIRCRAFT/src/conf/persistence.xml new file mode 100644 index 0000000..b11b056 --- /dev/null +++ b/ABC AIRCRAFT/src/conf/persistence.xml @@ -0,0 +1,10 @@ + + + + jdbc/__default + false + + + + + diff --git a/ABC AIRCRAFT/src/java/com/login/LoginDaoClass.java b/ABC AIRCRAFT/src/java/com/login/LoginDaoClass.java new file mode 100644 index 0000000..e2ce72e --- /dev/null +++ b/ABC AIRCRAFT/src/java/com/login/LoginDaoClass.java @@ -0,0 +1,19 @@ + +package com.login; + +import org.hibernate.Session; +import org.hibernate.SessionFactory; +import org.hibernate.Transaction; + +public class LoginDaoClass { + public void addData (int id,String name,int age,int myear,String type,int time,String schedule) + { + SessionFactory sf =SessionClass.getSession(); + Session s = sf.openSession(); + Transaction t = s.beginTransaction(); + LoginEntity re = new LoginEntity(id,name,age,myear,type,time,schedule); + s.save(re); + t.commit(); + s.close(); + } +} diff --git a/ABC AIRCRAFT/src/java/com/login/LoginEntity.java b/ABC AIRCRAFT/src/java/com/login/LoginEntity.java new file mode 100644 index 0000000..7ff2389 --- /dev/null +++ b/ABC AIRCRAFT/src/java/com/login/LoginEntity.java @@ -0,0 +1,92 @@ + +package com.login; + +import java.io.Serializable; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + + +@Entity +public class LoginEntity implements Serializable { + + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + private String name; + private int age; + private int myear; + private String type; + private int time; + private String schedule; + + public LoginEntity() { + } + + public LoginEntity(int id, String name, int age, int myear,String type,int time, String schedule) { + this.id = id; + this.name = name; + this.age = age; + this.myear = myear; + this.type = type; + this.type = type; + this.time = time; + this.schedule = schedule; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + public int getMyear() { + return myear; + } + + public void setYear(int myear) { + this.myear = myear; + } + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public int getTime() { + return time; + } + + public void setTime(int time) { + this.time = time; + } + + public String getSchedule() { + return schedule; + } + + public void setSchedule(String schedule) { + this.schedule= schedule; + } +} + \ No newline at end of file diff --git a/ABC AIRCRAFT/src/java/com/login/SessionClass.java b/ABC AIRCRAFT/src/java/com/login/SessionClass.java new file mode 100644 index 0000000..170ce30 --- /dev/null +++ b/ABC AIRCRAFT/src/java/com/login/SessionClass.java @@ -0,0 +1,47 @@ + +package com.login; + +import org.hibernate.HibernateException; +import org.hibernate.Query; +import org.hibernate.Session; +import org.hibernate.SessionFactory; +import org.hibernate.Transaction; +import org.hibernate.cfg.Configuration; + +public class SessionClass { + + public static SessionFactory getSession() { + Configuration config = new Configuration(); + config.configure("login.cfg.xml"); + SessionFactory sf = config.buildSessionFactory(); + return sf; + } + public static int update(LoginEntity u) { + int status = 0; + try { + SessionFactory sf = getSession(); + Session session = sf.openSession(); + Transaction t = session.beginTransaction(); + Query query = session.createQuery("update LoginEntity set id=:id, name =:name, age=:age ,myear=:myear ,type=type ,time=time ,schedule=schedule"); + query.setParameter("id", u.getId()); + query.setParameter("name", u.getName()); + System.out.println(u.getAge()+" +++++++++++++++++++++++++++++++++++++++++++ "); + query.setParameter("age", u.getAge()); + query.setParameter("myear", u.getMyear()); + query.setParameter("type", u.getType()); + query.setParameter("time",u.getTime()); + query.setParameter("schedule",u.getSchedule()); + int result = query.executeUpdate(); + System.out.println(result + "LoginEntity data Update Status="); + + t.commit(); + session.close(); + sf.close(); + } catch (HibernateException e) { + System.out.println(e); + } + return status; + } + + +} diff --git a/ABC AIRCRAFT/src/java/com/login/loginServlet.java b/ABC AIRCRAFT/src/java/com/login/loginServlet.java new file mode 100644 index 0000000..543a0ab --- /dev/null +++ b/ABC AIRCRAFT/src/java/com/login/loginServlet.java @@ -0,0 +1,85 @@ + +package com.login; + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class loginServlet extends HttpServlet { + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + try (PrintWriter out = response.getWriter()) { + + int id = Integer.parseInt(request.getParameter("id")); + String name = request.getParameter("name"); + int age = Integer.parseInt(request.getParameter("age")); + int myear = Integer.parseInt(request.getParameter("myear")); + String type= request.getParameter("type"); + int time = Integer.parseInt(request.getParameter("time")); + String schedule= request.getParameter("schedule"); + LoginDaoClass dao = new LoginDaoClass(); + dao.addData(id, name, age, myear, type, time, schedule); + out.println("succesfully assigned!!!!!"); + + + + + + + out.println(""); + out.println(""); + out.println(""); + out.println("Servlet loginServlet"); + out.println(""); + out.println(""); + out.println("

Servlet loginServlet at " + request.getContextPath() + "

"); + out.println(""); + out.println(""); + } + } + + // + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} diff --git a/ABC AIRCRAFT/src/java/login.cfg.xml b/ABC AIRCRAFT/src/java/login.cfg.xml new file mode 100644 index 0000000..b458b33 --- /dev/null +++ b/ABC AIRCRAFT/src/java/login.cfg.xml @@ -0,0 +1,46 @@ + + + + + + + + diff --git a/ABC AIRCRAFT/web/WEB-INF/glassfish-web.xml b/ABC AIRCRAFT/web/WEB-INF/glassfish-web.xml new file mode 100644 index 0000000..f5b9088 --- /dev/null +++ b/ABC AIRCRAFT/web/WEB-INF/glassfish-web.xml @@ -0,0 +1,11 @@ + + + + /ABC_AIRCRAFT + + + + Keep a copy of the generated servlet class' java code. + + + diff --git a/ABC AIRCRAFT/web/WEB-INF/web.xml b/ABC AIRCRAFT/web/WEB-INF/web.xml new file mode 100644 index 0000000..a5ce0df --- /dev/null +++ b/ABC AIRCRAFT/web/WEB-INF/web.xml @@ -0,0 +1,33 @@ + + + + javax.faces.PROJECT_STAGE + Development + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + loginServlet + com.login.loginServlet + + + Faces Servlet + /faces/* + + + loginServlet + /loginServlet + + + + 30 + + + + faces/index.xhtml + index.html + + diff --git a/ABC AIRCRAFT/web/edit.jsp b/ABC AIRCRAFT/web/edit.jsp new file mode 100644 index 0000000..7732305 --- /dev/null +++ b/ABC AIRCRAFT/web/edit.jsp @@ -0,0 +1,12 @@ +<%@page import="com.login.SessionClass"contentType="text/html" pageEncoding="UTF-8"%> + + + + + + +<% +int i=SessionClass.update(u); +response.sendRedirect("view.jsp"); +%> + diff --git a/ABC AIRCRAFT/web/editform.jsp b/ABC AIRCRAFT/web/editform.jsp new file mode 100644 index 0000000..b219d3d --- /dev/null +++ b/ABC AIRCRAFT/web/editform.jsp @@ -0,0 +1,40 @@ + +<%@page import="java.util.List"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + ABC AIRCRAFT SERVICE + + + <%@page import="com.login.SessionClass,com.login.LoginEntity"%> + +<% +int id = Integer.parseInt(request.getParameter("id")); +LoginEntity loginEntity= SessionClass.getRecordById(id); +%> +

Edit Form

+
+ +Id: + +Name: + +Age: + +Manufacture Year: + +Aircraft Type: + +Running Hours: + +Maintenance Scheduled/Unscheduled: + + + +
+ + + + diff --git a/ABC AIRCRAFT/web/index.html b/ABC AIRCRAFT/web/index.html new file mode 100644 index 0000000..24190e0 --- /dev/null +++ b/ABC AIRCRAFT/web/index.html @@ -0,0 +1,21 @@ + + + + + ABC AIRCRAFT SERVICE + + + + +

ABC AIRCRAFT SERVICE

+ + +
+ +USER ID :

+PASSWORD :

+ + +
+ + diff --git a/ABC AIRCRAFT/web/login.jsp b/ABC AIRCRAFT/web/login.jsp new file mode 100644 index 0000000..83de42e --- /dev/null +++ b/ABC AIRCRAFT/web/login.jsp @@ -0,0 +1,46 @@ +<%-- + Document : login + Created on : 31-Dec-2021, 19:41:04 + Author : hp +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + +<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%> +<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%> + + + + + ABC AIRCRAFT SERVICE + + + + + +
+ + + + + + + + + + + + + + + + + + +
AIRCRAFT NUMBER
AIRCRAFT NAME
AGE
MANUFATURE YEAR
AIRCRAFT TYPE
RUNNING HOURS
MAINTENANCE SCHEDULED/UNSCHEDULED
+ +
+ VIEW USER'S + + + diff --git a/ABC AIRCRAFT/web/view.jsp b/ABC AIRCRAFT/web/view.jsp new file mode 100644 index 0000000..1daacf1 --- /dev/null +++ b/ABC AIRCRAFT/web/view.jsp @@ -0,0 +1,76 @@ +<%@page import="com.login.LoginEntity"%> +<%@page import="com.login.LoginEntity"%> +<%@page import="org.hibernate.cfg.Configuration,java.util.*,org.hibernate.Session,org.hibernate.*,org.hibernate.cfg.*"contentType="text/html" pageEncoding="UTF-8"%> +<%!Session session1=null;Configuration config1 = null;int id;int age;int myear;int time;String name;String type;String schedule;%> + + + + + ABC AIRCRAFT SERVICE + + + + + + + + + + + + + + <% + config1 = new Configuration(); + config1.configure("login.cfg.xml"); + SessionFactory sf = config1.buildSessionFactory(); + session1 = sf.openSession(); + Transaction t = session1.beginTransaction(); + + Query query = session1.createQuery("from LoginEntity"); + List list = (List) query.list(); + for (LoginEntity st : list) { + id = st.getId(); + age =st.getAge(); + name =st.getName(); + myear = st.getMyear(); + type = st.getType(); + time = st.getTime(); + schedule = st.getSchedule(); + System.out.println("assigned"+st.getId()+"," + st.getAge() + "," + + st.getName() + "," + st.getMyear()+ "," + st.getType()+","+st.getTime()+","+st.getSchedule()); + + %> + + + + + + + + + + + + <%} + t.commit(); + session1.close(); + sf.close(); + %> +
AIRCRAFT NUMBERAIRCRAFT NAMEAGEMANUFATURE YEARAIRCRAFT TYPERUNNING HOURSMAINTENANCE SCHEDULED/UNSCHEDULED
<%= id%><%= name%><%= age%><%= myear%><%= type%><%= time%><%= schedule%>EditDELETE
+
+ +