For web application development JSP generally supports two types of architecture.
i. Model 1 and
ii. Model 2 architecture
We’ll be covering the following topics in this tutorial:
JSP Model-I Architecture
In model 1 architecture, the web browser directly accesses the JSP pages. If there is need of, generating output from database jsp page interacts with JavaBeans, which is present inside the web container of model 1 architecture.
JSP Model II Architecture
In model 2 architecture, the browser accesses the JSP page indirectly. The Servlet program acts as controller between JSP page and browser window. If JSP page needs to interact with database for response then servlet program creates the instances of JavaBeans, and JavaBeans invokes the database server.