JSP Architecture & Model

Architecture of JSP:

There were primarily two types of architecture based on the JSP functionality and its improvement in the further days of its development. With the above criteria we have two types of architecture as below:

  1. Model Type 1 of Architecture
  2. Model Type 2 of Architecture

Model 1 type of Architecture:

  1. The processing of files like the incoming request and replying back to the request which in earlier stages was mainly controlled by the JSP file alone.
  2. The main pros of this type of architecture were it was simple, compact and there was an easy separation of presentation of matter and the details in the content.
  3. But this type faced its worst nightmare when the design of the project goes complex implementations.
  4. This was easy for the maintenance of JSP developers but for other design and patterns this was seems to be a tough issue.
  5. And this type of architecture was named as Model 1 type of architecture.

Model 2 type of Architecture:

  1. This model 2 type of architecture was named as “Hybrid architecture”.
  2. In this type we use both servlet and JSP, where the servlet acts as an in charge or controller and is in charge of the request processing and the creation of any beans or objects used by the JSP, as well as deciding, depending on the user’s actions, which JSP page to forward the request.
  3. In here, there was decided that there will not be any processing logic in the JSP page.
  4. It is simply responsible for retrieving any objects or beans that may have been previously created by the servlet, and extracting the dynamic content from that servlet for insertion within static templates.
  5. This was most widely used everywhere because of the strengths of both the JSP for presentation layer and the servlet for performing intense process tasks.
  6. Here we have the cleanest separation of presentation from content, leading to clear delineation of the roles and responsibilities of the developers and page designers on your programming team.
  7. The JSP container is responsible for intercepting requests for JSP pages. This tutorial makes use of Apache which has built-in JSP container to support JSP pages development.

Posted on July 12, 2014 in Java Server Pages

Share the Story

Leave a reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top