This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am studying Servlet and JSP from Head First Servlet & JSP, great book btw!
Do you know what w web server is? Like Apache? A container like Tomcat is a simpler web server.
What tomcat does is to listen to requests coming from a client (browser) and serves te corresponding web app.
A web app is an "inhanced" web site, that means it containes static pages (plain HTML) and also Servlet, JSP etc...Tomcat can serve Servlet and JSP: it provides a servlet context, servlet config, converts, compile, and executes your JSP (yes, JSPs are converted into "regular" servlet by the container!) and stuff like that...
Tomcat is a Servlet/JSP Container, it is NOT an EJB Container (at least according to my knowledge you cannot use EJB using Tomcat as Container).
To deploy something means to have it up and running on the server (container). There is a big difference between develop a web app and deploy a web app, when you develop you have a certain directory structure specific for the development, but when you deploy you have to follow some rules to "help" the container to find whatever it needs in the right place (like the WEB-INF directory, the Deployement Descriptor DD web.xml etc.).
I googled a little bit and this is what I have found:
Definitions of Servlet container on the Web:
* A container that provides the network services over which requests and responses are sent, decodes requests, and formats responses. All servlet containers must support HTTP as a protocol for requests and responses, but may also support additional request-response protocols such as HTTPS. software.allindiansite.com/java/sjava.html
* A servlet container comprises essentially the component of a web server that hosts and interacts with Java servlets. en.wikipedia.org/wiki/Servlet_container
Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
Tomcat is developed in an open and participatory environment and released under the Apache Software License. Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. We invite you to participate in this open development project. To learn more about getting involved, click here.
Originally posted by Chris Weathers: Another question from me...this really is a great place to learn!
Anyway, my questions this round:
1. What exactly is a container in context of JSPs/Servlets/EJBs? I'm reading through the TomCat documents and wondering what "container" actually means.
2. What does it mean to _deploy_ something in this same context?
For future reference, we have separate message boards for Servlets and JSPs. You should post related questions there next time since the experts in these areas will be more likely to see your questions.