Hi, I had posted this twice earlier but did not get any reply so am posting it again. Kathy\Bert please help!!! I was reading the second chapter of "HF-Serlets and JSP" and came across the terms "container" and "server". Till now my understanding was that a server itself controls the life cycle of a servlet. But here it is mentioned that the life cycle is controlled by a container. Can somebody please clear the following doubts related to container and server:-
1. Do they run in the same JVM or different JVM 2. Can somebody please tell me what is a "container" and what is a "server" in the context of IBM's Websphere.
The terms Container and Server tend to be used interchangably. 'Server' can also be used to mean the machine that everything runs on. I think officially one should use the term 'web app server' for the component that runs kind of like an underlying operating system, intercepting all requests to the machine. This web app server passes requests on to the continer when appropriate. The container is the piece of software that sits within / alongside the web app server and has its own jvm. Since you're posting in the SCWCD forum, I guess you're most interested in the web container. If you're developing EJBs, these would run in an EJB container. You can also have multiple versions of each container running on a single server & each has its own jvm.
It used to be that if you were working in the open source arena, you could think of Apache as the web server, Tomcat as the web container & JBoss as the EJB container. Nowadays I think these components come bundled together in some ways and the distinction isn't so obvious.
In terms of Websphere (which I also use ) the distinction isn't obvious at all - the product has all of the above components "seamlessly integrated". It hasn't got in the way for me when writing / developing code etc, but is one of those things WebSphere does to 'help' that makes it much harder to understand how things work when you're trying to learn the technology. (I also hate the 'project' business...) Might be worth posting a specific question on the Websphere forum for more info.