Hi there, Tomcat is a free Java 2 Enterprise Edition (J2EE) "Web Container". A Web Container is a piece of server software that works with a regular web server (like Apache, which you might be familiar with--it's one of the most popular web servers) and allows the web application to have more than just static HTML pages. A Web Container lets you Servlets and JSPs, which let you use Java code to do part of the work when a client using a web browser makes a request.
There's a Web Container running behind javaranch, for example, to support some of the things on javaranch that need more dynamic processing, or that require saving something to the server.
Basically, a Web Container lets you create web site "helper apps" in Java, rather than writing more conventional "CGI" programs in something like Perl.
So, if you want to write Java code to help support your web site, you need a Web Container like Tomcat. Tomcat can also be used as a stand-alone web server, but it's not very powerful for that... so most people configure Tomcat to work with a more powerful web server like Apache. Then when a client request comes in from a browser, Apache gets the request and decides (based on the request URL) if Apache can simply serve up a page sitting on the server, or if it needs to send the request to a Java servlet for processing.
Anyway, when you think of Tomcat, think of "Servlets and JSPs" or "Java code running as part of the web server".
I hope the answer is as easy as you thought it would be
I don't know how new you are to java, or if the following will help, but I'll try and draw it out in the mud for ya:
Tomcat is a special type of server for JavaServer Pages, and Servlets.
Servlets are a sort of java program that runs on a special type of server. Servlets take in what you send them (when you click on a link or button, you send some info to a server), and spit out what they decide is the right thing to spit out (well, a webpage, just like the one you're looking at).
Tomcat listens on port 8080 -confiquration info and it has a folder called web(or something similar) in it's directory and if you place a web-app(.WAR)-file in it, tomcat will deploy it when it's(tomcat) running.
To start tomcat execute the startup.bat(or something similar) int it's bin folder.
A WAR file is similar to .jar and .rar in the sense that it's a compressed file containing all the goodies your application needs to run. This can be created following a 'New->Webb-application wizard in JBuilder for example.
How to do all the configurations is a different story but I hope this sheds some light.
PS - Remember this was never meant to be easy, thinking like a user makes java (and related technologies) very frustrating.
posted 15 years ago
Thanks for help
posted 15 years ago
(that's more to my upper coment
Thank's now I know more about Tomcat!
But I've got a second question now:
Where can I learn more about Servlets and JSP in specific?