• Post Reply Bookmark Topic Watch Topic
  • New Topic

A Simple MVC-EJB Scenario  RSS feed

 
Vikas Aggarwal
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have this situation in MVC
1. A JSP/HTML has a text box and a submit button. This text box accepts the money value (say 20000).
2. The interest rate is in the database, in a table.
3. We have entity bean of that table.
4. On the submission of the form, the interest rate must be fetched from the database, the calculations for the interest for one year must be done and the out put must be shown to the user.
5. The user session should also be taken care of becuase he might want to go to other page based on the out put.
Thanks.
 
Parsuram panigrahi
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not quite sure what you are asking. Are you asking the architecture of the application? Does your entity bean get the interest rate from the data base? You can do this by a simple servlet which reads the interest rate from the database and does the calculation, and transfers the control to the required.
 
Geeta Ramasami
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If u need to follow the MVC architecture, u can post the jsp request to a servlet.From servlet u can call session bean which acts as a controller and will also maintain the clients state.The session bean will call the entity bean which acts as ur Model in turn will compute the interest rate.
Hope this helps
Regards
Geeta
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!