Open In App

JSP Access Model

JSP is java based technology which is used to simplify the development of the dynamic webpage. JSP is used to separate the dynamic content of the web page from its content with the help of HTML and JSP tags.

There are two JSP Model Architecture:



Features of MVC:

  1. Clients do not request pages directly. All clients requests go to controller servlet.
  2. Each request includes data i.e; the request action, any parameter for that action.
  3. Controller servlet decides which page should be returned to the user, augment requests object with data to be displayed to the user.

Advantages of MVC:

The processing is divided between presentation (JSPs) and controllers(front components). Presentation components are JSP pages that generate HTML/XML response that determines the user interface rendered by the browser. Front components do not handle any presentation issues, but rather process, all the HTTP request. They are responsible for creating beans or object used by presentation components, as well as for deciding, depending on the user’s action which presentation component to forward the request to. The front component can either be implemented as servlet or JSP.
Controller’s Responsibilities:

  1. Request processing
  2. Creation of any beans or objects used by the presentation JSP.
  3. Deciding, depending on the user’s action, which JSP to forward the request to.
  4. Data validation
  5. View Responsibilities:
    There is no processing logic within the presentation JSP itself: it is simply responsible for retrieving the objects that may be previously created by the servlet and extracting the dynamic content for insertion with static templates.

Article Tags :