Question

In: Computer Science

As an enterprise system developer, you need to develop the registration page of the employee management...

As an enterprise system developer, you need to develop the registration page of the employee management system. The administrator of the system registers a new employee using the GUI developed in JSP. The required table ‘Employee’ is provided in mysql database with columns as employee id, name, address, city, state and zip code as shown in figure.

Write a GUI snippet/JSP code with GUI components to take the user’s input. Separately, write the servlet code to insert the input records from the JSP page into the ‘employee’ table using JDBC (Java Database Connectivity).
Note: You may assume the username and password for the database connectivity.

Solutions

Expert Solution

1]

Firstly for insert data in MySQL using JSP first we have to create a table in data base.

CREATE TABLE Employee(e_id int,e_name text,e_address text,e_city text,e_state text,e_zipcode int);
insert into Employee values(1,"Poonam","Manik nagar","pune","MG Road",412307);
select * from Employee;

2]

Code to create Employee registeration form and jsp code to insert values into Employee tble using JDBC

</html>
<html>
<head>
<title>Registeration Form</title>
</head>
<body>
<form action="index.jsp">
Employee Id:<input type="text" name="eid" value="Id..." onclick="this.value=''"/><br/>
Employee Name:<input type="text" name="ename" value="Name..." onclick="this.value=''"/><br/>
Employee Address:<input type="text" name="eaddress" value="Address..." onclick="this.value=''"/><br/>
Employee City<input type="text" name="ecity" value="City..." onclick="this.value=''"/><br/>
Employee State<input type="text" name="estate" value="State..." onclick="this.value=''"/><br/>
Employee Pin Code:<input type="text" name="epincode" value="Pin Code..." onclick="this.value="''"/><br/>
<input type="submit" value="Register"/>

// Jsp code to insert values in Employee table using JDBC connectivity
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@page import="java.sql.*,java.util.*"%> //import java.sql and java.util package

<%
String e_id=request.getParameter("eid"); //access and stored user input values of form in e_id parameter
String e_name=request.getParameter("ename"); //access and stored user input values of form in e_name parameter
String e_address=request.getParameter("eaddress"); //access and stored user input values of form in e_address parameter
String e_city=request.getParameter("ecity"); //access and stored user input values of form in e_cityt parameter
String e_state=request.getParameter("estate"); //access and stored user input values of form in e_state parameter
String e_pincode=request.getParameter("epincode"); //access and stored user input values of form in e_pincode parameter
int employee_id = Integer.parseInt(e_id); //convert e_id parameter from string to integer and stored that value into employee_id
int employee_pincode = Integer.parseInt(e_pincode); //convert e_pincode parameter from string to integer and stored that value into employee_pincode   

try
{
Class.forName("com.mysql.jdbc.Driver"); // code for database connection in mysql
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "");
Statement st=conn.createStatement(); // Creating object of Statement class

// call to method ececuteUpdate to insert values in Employee table
int i=st.executeUpdate("insert into Employee(employee_id,e_name,e_address,e_city,e_state,employee_pincode)values('"+employee_id+"','"+e_name+"','"+e_address+"','"+e_city+"','"+e_state+"','"+employee_pincode+"')");
out.println("Data is successfully inserted!");
}
catch(Exception e)
{
System.out.print(e);
e.printStackTrace();
}
%>
</form>
</body>
</html>

If my answer is helpful for you,then upvote for my answer.


Related Solutions

In this Question using c++, you are to develop an employee management system using classes. You...
In this Question using c++, you are to develop an employee management system using classes. You need to develop two classes: Date and Employee. The Date class has the three attributes (int): month, day, and year. The class has the following member functions: • string getDate(void): returns a string with the date information (e.g, Mach 27, 2020). In addition to these, declare and implement proper constructors, a copy constructor, a destructor, and getters and setters for all data members. The...
A). The board of directors of ClariMak, a manufacturing enterprise has tasked its management to develop...
A). The board of directors of ClariMak, a manufacturing enterprise has tasked its management to develop a new mission statement that details the enterprise’s line of business, market size and niche. The new mission statement reads: “We want to continually grow through our commitment to quality and delivering quality products to our customers”. In addition, the management of ClariMak developed the following set of vision statements to complement the mission statement: • Provide superior returns to our shareholders • Continually...
Your firm has been hired to develop new software for the? university's class registration system. Under...
Your firm has been hired to develop new software for the? university's class registration system. Under the? contract, you will receive $505,000 as an upfront payment. You expect the development costs to be $433,000 per year for the next 33 years. Once the new system is in? place, you will receive a final payment of $834,000 from the university 44 years from now. a. What are the IRRs of this? opportunity???? (Hint: Build an Excel model which tests the NPV...
Your firm has been hired to develop new software for the​ university's class registration system. Under...
Your firm has been hired to develop new software for the​ university's class registration system. Under the​ contract, you will receive $501,000 as an upfront payment. You expect the development costs to be $436,000 per year for the next 3 years. Once the new system is in​ place, you will receive a final payment of $847,000 from the university 4 years from now. a. What are the IRRs of this​ opportunity?  ​(Hint​: Build an Excel model which tests the NPV...
Your firm has been hired to develop new software for the​ university's class registration system. Under...
Your firm has been hired to develop new software for the​ university's class registration system. Under the​ contract, you will receive $ 506 comma 000 as an upfront payment. You expect the development costs to be $ 433 comma 000 per year for the next 3 years. Once the new system is in​ place, you will receive a final payment of $ 833 comma 000 from the university 4 years from now. a. What are the IRRs of this​ opportunity?  ...
Your firm has been hired to develop new software for the university's class registration system. Under...
Your firm has been hired to develop new software for the university's class registration system. Under the contract, you will receive $506,000 as an upfront payment. You expect the development costs to be $443,000 per year for the next 3 years. Once the new system is in place, you will receive a final payment of $863,000 from the university 4 years from now. a. What are the IRRs of this opportunity?   (Hint: Build an Excel model which tests the NPV...
Your firm has been hired to develop new software for the​ university's class registration system. Under...
Your firm has been hired to develop new software for the​ university's class registration system. Under the​ contract, you will receive $492,000 as an upfront payment. You expect the development costs to be $439,000 per year for the next 33years. Once the new system is in​ place, you will receive a final payment of $865,000 from the university 4 years from now. a. What are the IRRs of this​ opportunity?  ​(Hint​: Build an Excel model which tests the NPV at​...
Your firm has been hired to develop new software for the​ university's class registration system. Under...
Your firm has been hired to develop new software for the​ university's class registration system. Under the​ contract, you will receive $ 510,000 as an upfront payment. You expect the development costs to be $ 444,000 per year for the next 3 years. Once the new system is in​ place, you will receive a final payment of $ 862,000 from the university 4 years from now. a. What are the IRRs of this​ opportunity?(Hint: Build an Excel model which tests...
Galvanized Products is considering purchasing a new computer system for their enterprise data management system. The...
Galvanized Products is considering purchasing a new computer system for their enterprise data management system. The vendor has quoted a purchase price of $110,000. Galvanized Products is planning to borrow 1/4th of the purchase price from a bank at 15.00% compounded annually. The loan is to be repaid using equal annual payments over a 3-year period. The computer system is expected to last 5 years and has a salvage value of $4,400 at that time. Over the 5-year period, Galvanized...
You are required to analyze a management information system for Nike. you need to prepare a...
You are required to analyze a management information system for Nike. you need to prepare a report a detailed and lengthy explanation of each paragraph below which includes: • Decide the type of (level of management) the system. • Explain and then evaluate the features of the system. • Make suggestions for the system
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT