• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Newbie Question: Tomcat Installation??

 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!!
 
Is that a spider in your hair? Here, threaten it with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic