You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by he...@teradyne.com on 2003/05/21 19:23:26 UTC

Help: Servlet container vs JSP container vs servlet engine vs JSP engine

ok, so I thought I had a pretty good understanding of how it all works.
But then the more different documentation, books and articles I read, the
less sure I get about this one(read subject)

The way I see it:
1. A servlet/and JSP container contains a Servlet and JSP engine.
2. Servlet engine "runs" servlet and JSP engine "runs" JSPs(catalina and
Jasper 2).
3. When a servlet forwards to a different resource such as a JSP, it the
task of the servlet/JSP container help doing this(not the engines).
4. A JSP container can't exist without being a servlet container, but a
servlet container can exist without supporting JSPs(Its a servlet container
or both).
5. A JSP engine could exist without a servlet container and a servlet
engine.

The words engine and container is used interchangably all over the place.
The official specs tend to only refer to containers, saying JSP run in the
servlet container(since JSP are really just servlets, although a special
kind). In tomcat documentation cataline is referred to as both the
container and an engine. Is it one or both?? Which is what and what is
where and where is which?!?

Hope someone can shed some light on this

Thx,
Henrik Bentel





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: Help: Servlet container vs JSP container vs servlet engine vs JSP engine

Posted by Hans Bergsten <ha...@gefionsoftware.com>.
henrik.bentel@teradyne.com wrote:
> ok, so I thought I had a pretty good understanding of how it all works.
> But then the more different documentation, books and articles I read, the
> less sure I get about this one(read subject)
> 
> The way I see it:
> 1. A servlet/and JSP container contains a Servlet and JSP engine.
> 2. Servlet engine "runs" servlet and JSP engine "runs" JSPs(catalina and
> Jasper 2).
> 3. When a servlet forwards to a different resource such as a JSP, it the
> task of the servlet/JSP container help doing this(not the engines).
> 4. A JSP container can't exist without being a servlet container, but a
> servlet container can exist without supporting JSPs(Its a servlet container
> or both).
> 5. A JSP engine could exist without a servlet container and a servlet
> engine.
> 
> The words engine and container is used interchangably all over the place.
> The official specs tend to only refer to containers, saying JSP run in the
> servlet container(since JSP are really just servlets, although a special
> kind). In tomcat documentation cataline is referred to as both the
> container and an engine. Is it one or both?? Which is what and what is
> where and where is which?!?
> 
> Hope someone can shed some light on this

In general, "engine" is the old term for what's now called a
"container" (renamed when the servlet and JSP specs got included in the
J2EE umbrella spec). The servlet spec describes the "servlet container",
the JSP spec the "JSP container"; together these two containers are also
referred to as the "web container".

The "engine" term has a special meaning in Catalina. It's a container
for a Service, handling all requests directed to one or more Connectors
for the Service, see the Tomcat 4 docs for more info:

   <http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/index.html>

In many books and articles, the terms "engine" and "container" (with
the prefixes "servlet", "JSP" or "web") are often used interchangably,
as you have noticed.

Hans
-- 
Hans Bergsten                                <ha...@gefionsoftware.com>
Gefion Software                       <http://www.gefionsoftware.com/>
Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
Details at                                    <http://TheJSPBook.com/>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org