File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Newbie Question: Tomcat Installation?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Newbie Question: Tomcat Installation??" Watch "Newbie Question: Tomcat Installation??" New topic
Author

Newbie Question: Tomcat Installation??

Jon Lee
Ranch Hand

Joined: Mar 04, 2005
Posts: 134
Newbie Question: Tomcat Installation

Hi guys:

I wanna install Tomcat. But I have one question: Do I need to install Apache HTTP Server before I install Tomcat? And what's the relationship between Apache HTTP Server and Tomcat??

Many thnx your answers...


SCJP 5.0 - 98% (2007)<br />SCWCD 1.4 - 97% (2007)
Andrew Moores
Greenhorn

Joined: May 28, 2005
Posts: 12
You don't need to install Apache to get started with Tomcat.

Apache is a web server and Tomcat is Java Servlet container. This means Apache simply sends back an http messages containing files (html pages, jpgs, etc.) or runs simple scripts and sends the output from these scripts back in the http message.

Tomcat can perform the same functions but in addition it will also run Java programs (known as Servlets) and process JSPs. JSPs are files containing JSP tags, or instructions, that Tomcat will execute in order to produce a plain html file that can be sent to the users browser for viewing. Tomcat gives you Java in your html pages and the ability to run Java programs.

However, Tomcat can also serve all the different types fo files that Apache serves.

When you install and run Tomcat you access the home page using something like http://localhost:8080/. This indicates to your browser that server you want to talk to is listening on port 8080. Apache usually listens on port 80 which is the default port for http. When you get to the Tomcat homepage you can read the Tomcat documentation.

When you're comfortable with Tomcat and have explored JSP and written some servlets you might want to try using Tomcat in tandem with Apache. The optimal set-up is to use Apache to process all the standard web components (plain html files, image files, etc) and to forward requests for JSPs and Java Servlets on to Tomcat. There a lots of advantages to this set-up. Let me know if you need some help getting Tomcat and Apache working as it took me a while to figure it out the first time.

This is a brief description and the truth and Apache and Tomcat is much deeper than I've described here but hopefully this have given you enough information to dive and try Tomcat!

--Andrew
Jon Lee
Ranch Hand

Joined: Mar 04, 2005
Posts: 134
Thank you so much, Andrew. You gave a very detailed, comprehensive and clear answer to my question. Now I have a more clear picture about Apache HTTP Server and Tomcat. Thnx for your help!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Newbie Question: Tomcat Installation??