Skip to content
Permalink
Browse files
ABC-AIRCRAFT-SERVICE
  • Loading branch information
babul4 committed Jan 5, 2022
1 parent 86eb238 commit 857a39a528506f07369d22258cf5500a09a4afb4
Show file tree
Hide file tree
Showing 55 changed files with 2,659 additions and 0 deletions.
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="ABC_AIRCRAFT" default="default" basedir=".">
<description>Builds, tests, and runs the project ABC AIRCRAFT.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-dist: called before archive building
-post-dist: called after archive building
-post-clean: called after cleaning build products
-pre-run-deploy: called before deploying
-post-run-deploy: called after deploying
Example of pluging an obfuscator after the compilation could look like
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Other way how to customize the build is by overriding existing main targets.
The target of interest are:
init-macrodef-javac: defines macro for javac compilation
init-macrodef-junit: defines macro for junit execution
init-macrodef-debug: defines macro for class debugging
do-dist: archive building
run: execution of project
javadoc-build: javadoc generation
Example of overriding the target for project execution could look like
<target name="run" depends="<PROJNAME>-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that overridden target depends on jar target and not only on
compile target as regular run target does. Again, for list of available
properties which you can use check the target you are overriding in
nbproject/build-impl.xml file.
-->
</project>
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

Empty file.
Empty file.
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="ABC_AIRCRAFTPU" transaction-type="JTA">
<jta-data-source>jdbc/__default</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.schema-generation.database.action" value="create"/>
</properties>
</persistence-unit>
</persistence>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright (c) 2008, 2016 Oracle and/or its affiliates. All rights reserved.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.
The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, the
"License"). You may not use this file except in compliance with the
License. You can obtain a copy of the License at
http://www.netbeans.org/cddl-gplv2.html
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
specific language governing permissions and limitations under the
License. When distributing the software, include this License Header
Notice in each file and include the License file at
nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the GPL Version 2 section of the License file that
accompanied this code. If applicable, add the following below the
License Header, with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
If you wish your version of this file to be governed by only the CDDL
or only the GPL Version 2, indicate your decision by adding
"[Contributor] elects to include this software in this distribution
under the [CDDL or GPL Version 2] license." If you do not indicate a
single choice of license, a recipient has the option to distribute
your version of this file under either the CDDL, the GPL Version 2 or
to extend the choice of license to its licensees as provided above.
However, if you add GPL Version 2 code and therefore, elected the GPL
Version 2 license, then the option applies only if the new code is
made subject to such option by the copyright holder.
Contributor(s):
-->
<hibernate-configuration>
<session-factory>

</session-factory>
</hibernate-configuration>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<context-root>/ABC_AIRCRAFT</context-root>
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>loginServlet</servlet-name>
<servlet-class>com.login.loginServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>loginServlet</servlet-name>
<url-pattern>/loginServlet</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
@@ -0,0 +1,12 @@
<%@page import="com.login.SessionClass"contentType="text/html" pageEncoding="UTF-8"%>
<jsp:useBean id="u" class="com.login.LoginEntity"></jsp:useBean>
<!DOCTYPE html>



<jsp:setProperty property="*" name="u"/>
<%
int i=SessionClass.update(u);
response.sendRedirect("view.jsp");
%>

@@ -0,0 +1,40 @@

<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ABC AIRCRAFT SERVICE</title>
</head>
<body>
<%@page import="com.login.SessionClass,com.login.LoginEntity"%>

<%
int id = Integer.parseInt(request.getParameter("id"));
LoginEntity loginEntity= SessionClass.getRecordById(id);
%>
<h1>Edit Form</h1>
<form action="edituser.jsp" method="post">

<tr><td>Id:</td><td>
<input type="text" name="name" value="<%= loginEntity.getId()%>"/></td></tr>
<tr><td>Name:</td><td>
<input type="text" name="name" value="<%= loginEntity.getName()%>"/></td></tr>
<tr><td>Age:</td><td>
<input type="text" name="age" value="<%= loginEntity.getAge()%>"/></td></tr>
<tr><td>Manufacture Year:</td><td>
<input type="text" name="myear" value="<%= loginEntity.getMyear()%>"/></td></tr>
<tr><td>Aircraft Type:</td><td>
<input type="text" name="type" value="<%= loginEntity.getType()%>"/></td></tr>
<tr><td>Running Hours:</td><td>
<input type="text" name="time" value="<%= loginEntity.getTime()%>"/></td></tr>
<tr><td>Maintenance Scheduled/Unscheduled:</td><td>
<input type="text" name="schedule" value="<%= loginEntity.getSchedule()%>"/></td></tr>
<tr><td colspan="2"><input type="submit" value="Edit User"/></td></tr>

</form>
</body>
</html>
</body>
</html>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<context-root>/ABC_AIRCRAFT</context-root>
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>
@@ -0,0 +1,21 @@
<!DOCTYPE html>

<html>
<head>
<title>ABC AIRCRAFT SERVICE</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1> ABC AIRCRAFT SERVICE</h1>
<table>

<tr><td> <form action="login.jsp">

USER ID :<input type="text" name="name"/><br><br/>
PASSWORD :<input type="password" name="password"/><br><br/>
<input type="submit" value="LOGIN HERE...."/>

</form></td></table>
</body>
</html>
@@ -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"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ABC AIRCRAFT SERVICE</title>
</head><body>
<th></th><td><input type="submit" value="ADD NEW SERVICE/MAINTENCE"/></td>
<th></th><td><input type="submit" value="MAINTENCE SCEDULE"></td>
</body>
<body>
<form action="loginServlet">
<table>
<th>AIRCRAFT NUMBER</th>
<td><input type="text" name="number"/></td><tr>
<th>AIRCRAFT NAME</th>
<td><input type="text" name="name"/></td><tr>
<th>AGE</th>
<td><input type="text" name="age"/><td></tr><tr>
<th>MANUFATURE YEAR</th>
<td><input type="text" name="myear"/><td></tr><tr>
<th>AIRCRAFT TYPE</th>
<td><input type="text" name="type"/><td></tr><tr>
<th> RUNNING HOURS</th>
<td><input type="text" name="hours"/></td></tr><tr>
<th>MAINTENANCE SCHEDULED/UNSCHEDULED</th>
<td><input type="text" name="schedule"/></td><td></tr>
<th></th><td><input type="submit" value="Assign"/></td>
<th></th><td><input type="submit" value="Close"></td>
<td><form action="view.jsp">
<input type="submit" value="view all users"/>
</form></td></tr>
</table>
<a href="view.jsp">VIEW USER'S</a>
</form>
</body>
</html>
@@ -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;%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ABC AIRCRAFT SERVICE</title>
<script>
var request;
function editing(temp) {
request = new XMLHttpRequest();
request.open("GET", "editform.jsp?id=?" + temp, true);
request.send();
request.onreadystatechange = function () {
if (request.readyState == 7) {
var val = request.responseText;
document.getElementById('edit').innerHTML = val;
}
}
}
</script>
</head>
<body>
<table border="8" width="60%">
<tr>
<th>AIRCRAFT NUMBER</th>
<th>AIRCRAFT NAME</th>
<th>AGE</th>
<th>MANUFATURE YEAR</th>
<th>AIRCRAFT TYPE</th>
<th>RUNNING HOURS</th>
<th>MAINTENANCE SCHEDULED/UNSCHEDULED</th>
</tr>
<%
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<LoginEntity> list = (List<LoginEntity>) 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());
%>
<tr>
<td><%= id%></td>
<td><%= name%></td>
<td><%= age%></td>
<td><%= myear%></td>
<td><%= type%></td>
<td><%= time%></td>
<td><%= schedule%></td>
<td><a href="editform.jsp?id=<%=id%>">Edit</a></td>
<td><a href="delete.jsp?id=<%=id%>" >DELETE</a></td>
</tr>
<%}
t.commit();
session1.close();
sf.close();
%>
</table>
<div id="edit"></div>
</body>
</html>

0 comments on commit 857a39a

Please sign in to comment.