I still did not "touch" to these topics, but I am curious to learn a bit more about those: what they are and how they interact (if there is such interaction). So, please excuse my question if it sounds too simple! In addition to this, what are the best books available? Is there "free" stuff on the web to learn those?
[This message has been edited by Serge Plourde (edited April 24, 2001).]
A common method of mixing JSPs and Java servlets is to have a Java servlet act as a controller and have views and models implemented as JSPs (Model-View-Controller design pattern, also sometimes referred to as Model 2 JSP approach). The controller can call the appropriate JSPs by utilizing a RequestDispatcher and the RequestDispatcher's forward() method or include() method. See http://java.sun.com/products/servlet/2.1/api/javax.servlet.RequestDispatcher.html for more details on RequestDispatcher.
Hi, JSP is designed to make the life of the programmer easier.Using servlets you can do lots and lots of complicated stuff, but you never tend to use all of them.If that is the case, JSP is the place where you should start from. By design JSP sits on the top of the servlets.What this means is when you write a JSP code and execute it the JSP Engine complies the JSP page as a servlet, and then makes the class file for it.After that the normal life cycle of the servlet, viz. init(), service() and destroy() follows. One more advantage of using JSP rather than Servlets, is that,it seperates static content from dynamic content.This means the HTML code can be designed in parallel with the dynamic code that is generated by the JSP tags.This allows Web developers to work in co-ordination with the Java Developers. Java Developer could make JavaBeans to be used by the Web Developers, who simply use it to generate the dynamic content.The inherent advantage you have with a JSP design is you seperate the business logic from the presentation logic making your page causing lesser maintenance problems. Hope this helps. Regards,