In this Project we are making two files named Index.html and ProcessEmployee.jsp In index.html we created structure of web application and in processEmployee.jsp we created logic to that html structure

Program:-

Index.html:-
<!DOCTYPE html>
<html>
    <head>
        <title>Experiment No 552</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
    <center><h1>Employee Registration Form</h1> 
        
        <form action="ProcessEmployee.jsp"><br>
            <b>First Name</b><input type="text" name="fname"><
            <b>last Name</b> <input type="text" name="lname"><br><br>
            <b>Date of birth</b> <input type="date" name="birth"><br><br>
            <b>Mobile Number</b> <input type="tel" name="phone"><br><br>
            <b>Email Address</b> <input type="email" name="Email"><br><br>
            <b>Designation</b><input type="text" name="post"><br><br>
            <b>Address</b> <input type="text" name="City"><br><br>            
            <input type="submit" value="Register"><br/>
        </form>
    </center>
      </body>
</html>


ProcessEmployee.jsp:-
 
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Data Registered</title>
    </head>
    <body>
        <%
            String first_name=request.getParameter("fname");
            String last_name=request.getParameter("lname");
            String designation=request.getParameter("post");
            String Mobile_Number=request.getParameter("phone");
            String DOB=request.getParameter("birth");
            String Emailed=request.getParameter("Email");
            String address=request.getParameter("City");

           out.print("First Name>"+first_name);%><br> 
        <% out.print("Last Name>"+last_name);%><br>
        <% out.print("Date of Birth>"+DOB);%><br>
        <% out.print("Mobile Number>"+Mobile_Number);%><br> 
        <% out.print("Email Address>"+Emailed);%><br> 
        <% out.print("Designation>"+designation);%><br> 
        <% out.print("Address>"+address);%>  
        
    </body>
</html>


Output:-


After clicking on Register Button