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:
- Should provide standard libraries required for coding.
- Should provide suitable environment for execution.
- Should call callback methods at appropriate times for the smooth execution.
- 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:
- Should capable to load the Servlet .class file at the request of the client, execute the Servlet.
- Accees the database server, if required.
- When the response is delivered close the connection with the client.
Send the output of execution to client as response.
what is abstract class ,what is abstract method, is it possible to make abstract method private?
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/
What is demon thread in java?
Refer this:
http://way2java.com/multithreading/miscellaneous-thread-methods/
What is URL rewriting in servlet?
It is old style of maintaining session tracking where session data is written in URL which moves between client and server. It is dropped today as it increases networking traffic and load on the server.