This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run Tomcat (Not as a service)

 
Matthew Vahedi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 2844
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic