I have a web based ERP package to be developed using the J2EE.So I decided to go for MVC archetecture: where all the requests from the client will first go to the Controller Servlet whose purpose is to just redirect or forward it to the appropiate Business Servlet.Business servlet will connect to database and populate the data in the Java Bean.Then the process from business servlet is redirected to JSP (which acts as the View) which will make use of the Java Bean data which is being populated by the Business servlet. Now following are my doubts: 1. So here the Controller is Controller Servlet and the View is JSP page then what is the Model. 2. If I want to use EJB where shall I make use of it.Can I use the EJB as an interface between servlet and the database(i.e. for connecting database from the servlet through EJB and populating the bean). 3. Can I make use of the structs framework?What is the benefit I get using it.
Hi, 1)In MVC architecture, Model is the core of the application. It maintains the state and data that the application represents.In your case model would be the Java bean. 2)You can use entity bean for database part.
Snigdha<br />Sun Certified Programmer for the Java™ 2 Platform
Hi 1. The model can be Java Bean or EJB. 2. DOnt use EJB if only it has to serve the purpose of interface between database and servlet. 3.Surely you can make use of the struct framework. This deals with MVC architecture. Hope this helps.. Cheers Ram
Joined: Jun 19, 2002
Hello Snigdha Solanki and Ram Kondawar Thanks for ur reply. I have seen the documentation struts framework.It seems its a very cumbersome process to use this framework.Is it so? Help