wood burning stoves
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
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: 2409
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: 17145
    
  27

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.


An IDE is no substitute for an Intelligent Developer.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 13018
    
    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,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to run Tomcat (Not as a service)
 
It's not a secret anymore!