If you care about MVC, then the best model is: V = JSP C = Servlets M = JavaBeans
(You don't have to be pure: MC can be some combination of Servlets and JavaBeans--the key idea being to use JavaBeans as mediators between your Servlets and your JSP.) The key point of the MVC model is keeping your presentation logic separate from your business logic. A good principle is to keep your Java code from getting mixed up with HTML and client-side scripting (e.g. JavaScript). Servlets are good for this reason. Furthermore, avoid using scriplets and use custom tags instead if you need to do any Java kind of work in your JSP. If you are building a significant application, take a look the Apache Struts frameworks; even if you don't use it, they've got some pretty excellent ideas, especially regarding the controller part of the puzzle. - David Gallardo --- "Nahid, Nazneen (CORP, Consultant)" <[EMAIL PROTECTED]> wrote: > Hi Everybody, > > Trying to find out which one is best:- > > Option 1:- Usage of JSP and Beans , modelling them > to follow the pattern of > MVC architecture. > Option 2:- Usage of JSP , Beans and Servlets, > modelling them as the MVC > Architecture. > > Basically the question is if I am using the Servlet > instead of JSP , both > doing the same purpose does it matter. __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com To change your membership options, refer to: http://www.sys-con.com/java/list.cfm
