creating dynamic web project in eclipse 1.) create Survey servlet class and update code with below class code 2) update web.xml with below content 3) create register,html file //Survey servlet class import java.io.*; import javax.servlet.ServletException; import javax.servlet.http.*; public class Survey extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //setting content type response.setContentType(\"text/html\"); //getting printwrite object PrintWriter out = response.getWriter(); // accessing Form values from request String firstName=request.getParameter(\"fName\"); String lastName=request.getParameter(\"lName\"); String emaiId=request.getParameter(\"userEmail\"); String dob=request.getParameter(\"dob\"); //printing values out.println(\"Thanks for completing our Customer Survey form!\"); out.println(\"The data you entered was: First name:\"+firstName+\"Last name:\"+lastName+\"Email address:\"+emailId+\"Birth date:\"+dob); //closing connection out object out.close(); } } //register.html FirstName: LatName: Email Id: Date of Birth: //web.xml SurveySurveySurvey/servlet/Registerregister.html Solution creating dynamic web project in eclipse 1.) create Survey servlet class and update code with below class code 2) update web.xml with below content 3) create register,html file //Survey servlet class import java.io.*; import javax.servlet.ServletException; import javax.servlet.http.*; public class Survey extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //setting content type response.setContentType(\"text/html\"); //getting printwrite object PrintWriter out = response.getWriter(); // accessing Form values from request String firstName=request.getParameter(\"fName\"); String lastName=request.getParameter(\"lName\"); String emaiId=request.getParameter(\"userEmail\"); String dob=request.getParameter(\"dob\"); //printing values out.println(\"Thanks for completing our Customer Survey form!\"); out.println(\"The data you entered was: First name:\"+firstName+\"Last name:\"+lastName+\"Email address:\"+emailId+\"Birth date:\"+dob); //closing connection out object out.close(); } } //register.html FirstName: LatName: Email Id: Date of Birth: //web.xml SurveySurveySurvey/servlet/Registerregister.html.