Hi, I will like to get some help in understanding some JSP consepts. I am a lillte confused regarding the MVC architechture. I understand how to create
JSP pages, servlets, bean file, and WEB.xml file, but I am not able to understand how all these modules work to gether.I have created some small apps that
have a JSP page and a bean file I have also created some apps that work with the JSP page and a servelet. My question is how / why do we use a servlet and
a bean file ( I realize that the servlet is some kind of controller) and the WEB.xml file? For example, let me assume I am creating a small application to calculate the employee payrolls. I have full time and part time employees. My site design will be as follows;
1. JSP page to enter the employee name/other details and also a field that will indicate it the employee is full time or part time.
2. On the same JSP page I will have a field that will show the number of hours worked,and if the employee is a full time employee there is a standard pay
and if the employee is a part time the pay is calculated on an hourly basis. Overtime will be (above 40 hrs a week) will be have to be doulbe the pay.The calculated pay will need to be stored in a DB.
3. The hourly pay rate is stored in a database. ( that value will be entered in through another form on the application.). And depending on the full time employee code the pay will be different.
4. I will need to have a db connection file.
5. I will need to see the monthly payroll report.
Now, my quesion is when I design this application:
1) Which is going to be my bean file
2)which is going to be my servlet
3) what will my web.xml file contain
I really do not need the code for the application, but just the logic to bring this whole thing together. Thank you for your help.