my dog learned polymorphism*
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 Murach's Java Servlets and JSP this week in the Servlets 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
Author

How to run Tomcat (Not as a service)

Matthew Vahedi
Greenhorn

Joined: Jan 05, 2012
Posts: 16
Hi,

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

cheers,
Tim Moores
Rancher

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
Greenhorn

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: 15950
    
  19

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
Rancher

Joined: Mar 22, 2000
Posts: 12755
    
    5
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

Bill


Matthew Vahedi
Greenhorn

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.

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