I am studying about servlet technology in which I heared the term servlet container and jsp container, I am getting confused that both are same or not.
A jsp page is handlded by jsp container but servlet is handled by servlet container.
On searching some site I found in servlet container there is a file called page compiler which turns servlet container into jsp contaner when a jsp request comes.
So I want to know, actually the conversion happens between these tow or both are the same things which is used interchangebly.
Thanks
A JSP container is an entity that translates, executes, and processes JSP pages and delivers requests to them. The exact make-up of a JSP container varies from implementation to implementation, but it will consist of a servlet or collection of servlets. The JSP container, therefore, is executed by a servlet container.
Servlets are faster as compared to JSP, as they have a short response time. JSP is slower than Servlets, as the first step in the JSP lifecycle is the conversion of JSP to Java code and then the compilation of the code. Servlets are Java-based codes. JSP are HTML-based codes.
Web containers are a part of a web server and they generally processes the user request and send a static response. Servlet containers are the one where JSP created components reside. They are basically responsible to provide dynamic content as per the user request.
Although its flexible configuration and interoperability with supporting technologies have enabled Apache Tomcat to act as a web application server in many circumstances, Tomcat is primarily a Java servlet container.
First of all, there is no such thing as a JSP container which is not a Servlet container because a JSP is translated into Servlet before it is executed. So a JSP container must support Servlet.
The opposite is not always true, at least in the old times when Servlet technology first came into existence and the container was called Servlet container.
When JSP came out, an engine that interprets and processes JSP pages into a servlet is added to the old Servlet container and people usually call such a container JSP/Servlet container. Nowadays, JSP container and Servlet container more or less mean the same thing because they both support JSP and Servlet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With