What is JSP container?

To execute a JSP file (known as JSP page), the Web server should be loaded with a software capable to execute JSPs. The software loaded should provide an environment for a JSP to execute. This environment is known as JSP engine or JSP container. Similarly, a Servlet container provides environment for a Servlet to execute.

A Web container is a general term which executes Web programs like ASP, Servlets, JSP, PHP etc. So, a JSP container and a Servlet container are Web containers.

In general, a container has the following responsibilities:

  1. Should provide standard libraries required for coding.
  2. Should provide suitable environment for execution.
  3. Should call callback methods at appropriate times for the smooth execution.
  4. Should maintain the life cycle of the program

In particular a, JSP container responsibilities:

The JSP container should be capable to translate JSP file to a Servlet file, compile the servlet file, execute the Servlet and send the output of execution to client as response. As internally, a JSP file is converted to Servlet, the JSP container should also come with a Servlet container.

In particular, a Servlet container responsibilities:

  1. Should capable to load the Servlet .class file at the request of the client, execute the Servlet.
  2. Accees the database server, if required.
  3. Send the output of execution to client as response.

  4. When the response is delivered close the connection with the client.
    Related Topics

  1. What are the prerequisites to learn JSP?
  2. What is JSP (Java Server Page)?
  3. 15 advantages of JSP over Servlets
  4. What is JSP engine or what is JSP container?
  5. How JSP works or What is JSP Architecture?

JSP View All

6 thoughts on “What is JSP container?”

    1. Abstract is fully discussed in places in way2.java.com as follows.

      Abstract Classes: http://way2java.com/oops-concepts/abstract-classes/

      Java Made Clear: Difference between Abstract class and Interface:

      Java Made Clear: Difference between Abstract class and Interface: http://way2java.com/oops-concepts/java-made-clear-difference-between-abstract-classinterface/

      Abstract class constructor & Interface abstract: http://way2java.com/oops-concepts/abstract-class-constructor-interface-abstract/

      Java Made Simple: Java private abstract Method with Example: http://way2java.com/oops-concepts/java-made-simple-java-private-abstract-method-with-example/

      Abstract Static Method: http://way2java.com/oops-concepts/abstract-static-method/

Leave a Comment

Your email address will not be published.