views:

4154

answers:

3

I'm having trouble installing Tomcat on my windows XP machine. I already have Apache and JDK 6 installed, what I need to know is:

  • Which file to download from the Lastest Tomcat download page

  • And how to install it so I can run the sample web app by going to http://localhost/

In my C:\Program Files\Java folder, I see the following folders, this should give you an idea of whether I need any additional stuff installed:

  • jdk1.6.0_10
  • jre1.6.0_04
  • jre1.6.0_06
  • jre1.6.0_07
  • jre6

Thanks.

+3  A: 

Tomcat 6 doesn't really need the full JDK and it runs with Java 1.5 as well, so Java wise you should be well off. Just make sure that JAVA_HOME environment variable is set.

You can either get the core zip or tar.gz file, or the Windows Service installer file.

Core zip file:

http://www.apache.org/dist/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.zip

Just unzip it and run bin/startup.bat. If you'd like to install it as a Windows service (and get the "usual" program entry in Windows add/remove programs) you can get the Windows Service Installer file instead:

http://www.apache.org/dist/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.exe

By default tomcat listens to port 8080, so to check out the sample apps you need to go to http://localhost:8080/examples/. You can change the default port by editing server.xml in the conf directory.

stian
What should the JAVA_HOME variable point to? Which directory from the ones i've listed in my question?
Click Upvote
It seems it was the 'jre6' dir and set by the 2nd link you provided. thanks man!
Click Upvote
Good, you're welcome! :)
stian
+1  A: 

I'm not sure what that URL is that you provided ("CGI" seems strange from a J2EE site), but the download links for tomcat are on its home page: http://tomcat.apache.org/

You should probably download version 6, particularly if you're using it for personal development. The older versions are available and maintained primarily to support users who don't want to migrate J2EE versions.

Finally: unless you are already using Apache, don't bother with it. Most commercial sites use Apache as a front-end because of its configurability (particularly URL rewriting). If you're just looking to develop web apps, Tomcat will act as web server in addition to servlet/JSP container.

Installation instructions (as well as all other instructions) are here:http://tomcat.apache.org/tomcat-6.0-doc/index.html

If you haven't done any J2EE development before, you'll need some docs on it. The Sun Tutorial is OK, but targeted to the Sun app-server and covers a lot of XML that isn't really necessary. Look at the intro chapters on web apps, then jump to chapter 11: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html

kdgregory
A: 

From the download page you should download the "Windows Service Installer" package.

As for the rest of the install process, follow just "Step 3: install Tomcat" described in the following page:

http://mircwiki.rsna.org/index.php?title=New_Installation_Instructions

marzagao