File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat Installation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Installation" Watch "Tomcat Installation" New topic

Tomcat Installation

Rupert matthews

Joined: Feb 26, 2008
Posts: 9
I am new in java server related programming. Just would like to ask if it is needed to install first the Apache web server before installing Tomcat on windows xp or vista? I just installed an apache Tomcat and got an error something like a error display on command prompt. please help or send links of step by step process on installing tomcat...thanks in advance
Travis Hein
Ranch Hand

Joined: Jun 06, 2006
Posts: 161
No, you should be ok to start off with just tomcat, without having to install apache http server as well. tomcat comes with its own http server built in, it will run on tcp port 8080 after it is started.

for windows installation, see the documentation here

you want the .exe installer, it will use a wizard like installer that will create a windows service and have tomcat started for you on windows startup. there should be a start menu shortcut for tools to start, stop, inspect tomcat server status.

basically, once you have at least a Java runtime installed (but should likely have the JDK to compile java sources anyway, since next steps would be to create web applications right.

other tools that might come in handy is "Ant", which uses an xml file to define tasks such as running the javac compiler on sources and then the jar command to package the application into a .war file. which can be deployed into your tomcat instance. but for starting out you could likely create a folder inside the webapps folder of tomcat, starting with an empty WEB-INF/web.xml is all thats needed for tomcat to recognize the folder as a web application. though this is usually inconvenient. its handy to learn how to use ant scripts to package war files and the tomcat deployer to publish them.

If you don't use an IDE yet, eclipse has a good j2ee developer edition of their ide, that lets you create a dynamic web application project and launch it, or even step through it in a debug mode, inside the IDE. they do this by connecting or attaching to a tomcat instance that is installed already on your system, or installed just for use with eclipse. its a bit of time to set this up the very first time, but the here is a good manual on this :

then later on when comfortable using tomcat on its own, it could be connected to apache using mod_jk (in the tomcat connectors project)/

Error: Keyboard not attached. Press F1 to continue.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Originally it was common to install both Apache http and Tomcat because Apache HTTP was a lot more efficient at serving up static content.

That's no longer true, but it's still common to install both. Just not necessary. The main advantage of installing Apache HTTP is that it can serve as a master web server for all webapps (J2EE and non-J2EE) and it can forward to one or more Tomcats, WebSpheres, or whatever, presenting a unified face to the world.

If the only webserver a machine is running is Tomcat, you can set the server.xml to port 80 and even replace the default Tomcat webapp with your own webapp. It's not usually worth it as far as I'm concerned, since the penalty for keeping an Apache HTTP handy is fairly low and you never know when it might come in handy.

Then again, my production servers are Linux-based, and you often have to go to extra trouble to keep Apache HTTP from being installed when the OS installs. That's not the case if you're running a Windows server.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Tomcat Installation
It's not a secret anymore!