MVC

Hi all In MVC... Controller is going to process the logic by calling EJB Or Bean... Moreover a controller can have subcontroller(i studied in an article ???)..Then controler redirects the request to jsp pages.. Jsp pages going to retrive data from bean for displaying .. Here what is the role of Taglib(userdefinded tags)..can taglib contain buisness logics... If so huv servlet will process it.. controller----->(bean,ejb) | |

| jsppage<---------(bean,ejb) In MVC 1)what is the role of Taglib 2)Actually what Model is going to contain(bean,EJB)if so who process it Help Pls priya shankar

Hi, The main purpose of Taglib is to hide the complex operation involving scriptlets. For e.g. there could be a JSP page which displays a list of employees in an organization. We can have a tag for this pupose rather than writing a scriptlet which is not modular and reusable. The web page devloper may not be knowing java and jsp tags help in hiding java. Model refers to data ans business logic in the application. For e.g. enities such as Employee Here is a link on MVChttp://java.sun.com/blueprints/patterns/MVC-detailed.html

Thanks I like to know who is going to process Model(contoller or View)... 1)Are there any situation when a view(jsp) calls a model 2)Huv a Taglib communicates with javaBean and in what situation 3)Huv Jsp(view) is going to retrive data from ejb(model)to display Help Pls priya shankar

It is responsilbilty of the controller to call the model. The main purpose of MVC is loose coupling between various components.

2)Huv a Taglib communicates with javaBean and in what situation It is possible to write custom tag handler classes that can access the javbeans. The taghandler classes have full access to JSP environment and so can access java beans stored in various scope(page,session,application,request). Please visit Sun's site for a tutorial on JSP. The taglib access beans whenever they need data. For .e.g an Employee bean can contain emp data, so you taglib will invoke the getter methods to retrieve data.

3)Huv Jsp(view) is going to retrive data from ejb(model)to display Through the controller. The returned from the model is stored by the controller as a java bean in the appropriate scope which are then used by JSP by javabean or custom tags. [/QB]