JavaBeans and JDBC The exercises listed below are intended to provide an instructive way to get used to JavaBeans and JDBC. Complete all three exercises. Exercise 1 – JavaBeans, Self-Call a) Write a page “MiniAdd.jsp” that carries out simple additions of two numbers. The JSP should: present a form where the user can specify two numbers, contain a submit button that posts back to the same page (i.e. “miniadd.jsp”), show the result of the requested addition, and also show the sum of all the additions carried out by the user so far. Create and use a JavaBean (“SumBean”) to validate user input and to perform the addition. The same bean should also be used to store the sum of all additions. (Consider that the page does not receive input parameters when it is called the first time.) b) Add a “Reset Button” to the page with which the user can reset the sum of all additions.
JavaBeans and JDBC The exercises listed below are intended to provide an instructive way to get used to JavaBeans and JDBC. Complete all three exercises. Exercise 1 – JavaBeans, Self-Call
a) Write a page “MiniAdd.jsp” that carries out simple additions of two numbers. The JSP should: present a form where the user can specify two numbers, contain a submit button that posts back to the same page (i.e. “miniadd.jsp”), show the result of the requested addition, and also show the sum of all the additions carried out by the user so far. Create and use a JavaBean (“SumBean”) to validate user input and to perform the addition. The same bean should also be used to store the sum of all additions. (Consider that the page does not receive input parameters when it is called the first time.)
b) Add a “Reset Button” to the page with which the user can reset the sum of all additions.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images