File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes How to run Tomcat (Not as a service) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to run Tomcat (Not as a service)" Watch "How to run Tomcat (Not as a service)" New topic

How to run Tomcat (Not as a service)

Matthew Vahedi

Joined: Jan 05, 2012
Posts: 16

I've just downloaded Tomcat zip file and want to run it. Would someone please give me step by step instruction or a link.
I've tried but failed so I wish to make sure that I'm on the right track before I use it in my dev environment and IDE.

O.S : Windows 7 64 bit
Java: using 32 bit + IDE 32 bit

Tim Moores

Joined: Sep 21, 2011
Posts: 2408
You didn't say what you tried, but the "bin" directory contains several scripts you can use to start Tomcat. Opening a command window and executing the start script should do the trick. That's preferable to just double-clicking that script, because then you won't see any error messages if something goes wrong (the window would too quickly).
Matthew Vahedi

Joined: Jan 05, 2012
Posts: 16
When I try to use Startup and Shutdown, it seems that Tomcat encounters a problem and can't start! the CMS windows disappears which means that Tomcat isn't up, even I tried in browser and it wasn't running.
So I want to know what could be wrong? is there any environment variable or something that I need to set?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15959

Actually, since the Tomcat server runs as a daemon, the fact that a window may briefly open and close can be a normal thing. I believe that the Windows "Start" command can avoid this issue, but I'm way out of practice on that, since I don't trust Windows to run critical servers and therefore am not running Tomcat that way.

Customer surveys are for companies who didn't pay proper attention to begin with.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12761
This is a common problem - here is what to do to see why Tomcat is failing to start.

1. Open a command prompt window and navigate to the /bin directory. You will be using startup.bat to start Tomcat, NOT an IDE.

2. in the /bin directory, change the last executable line in startup.bat to use "run"

this will force the next bat file to execute in the same window.

3. give the startup.bat command - you should see lots of messages as Tomcat tries to start.

4. note that you can copy the contents of the command prompt window to a text file for further examination


Matthew Vahedi

Joined: Jan 05, 2012
Posts: 16
William Brogden wrote:This is a common problem - here is what to do to see why Tomcat is failing to start.

Thanks for your help, unfortunately it did not fail again, so I am unable to guess what was wrong at this point in time.
I will open another thread in case that it fails to start up again.

It is sorta covered in the JavaRanch Style Guide.
subject: How to run Tomcat (Not as a service)
Similar Threads
Java in 64 bit Linux
32-bit Tomcat on 64 bit Win 7 server
Which Linux OS to select for Tomcat 6
Windows 7 compatibility
JSTL lib Not Recognized on Deployment