Question
Requirements : Create a mock form using the following criteria. C reate a JavaBean class, a HTML Form that lets users enter class data, a
Requirements: Create a mock form using the following criteria. Create a JavaBean class, a HTML Form that lets users enter class data, a Servlet class that processes form inputs, and a JSP that receives processing results from the Servlet and display them back to users.
1. JavaBean class: Create a Java class in a package. This Java class should qualify as a JavaBean class, i.e., meet all the JavaBean requirements. It should have at least 2 Constructors, 4 private data fields, including one boolean type, and their corresponding get and set methods.
2. HTML Form: Create an html page that contains a Form that let users enter the data field values for the JavaBean class. The form action should request a Servlet class (using the Servlets URL pattern).
3. Servlet: Create a Servlet class to handle form inputs. It should get parameters from the form and then use them to create an instance of the JavaBean. It should record the JavaBean data field values in a .txt file in the WEB-INF folder with one record per line. After that, it should add the JavaBean instance as an attribute to the session and forward the request and response to the JSP.
4. JSP: Create a JSP page to display processing results sent by the Servlet. You can use JSP standard tags.
Please include screen shot of the code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started