File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat startup.bat command not working

 
Ja vardhan
Ranch Hand
Posts: 169
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When am giving startup command from command prompt, it is showing error:
-------------------------------------------------------------
The CATALINA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
---------------------------------------------------------------

I had set that CATALINA_HOME to tomcat root directory :
C:\Program Files\Apache Group\Tomcat 4.1
I dont know where the problem is. In command prompt its just showing that error, nothing else. That means server is not started.
But when i give localhost:8080 in browser, its showing Tomcat server home page. This means server is running.. how come???
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you see the Tomcat welcome page, it's running.
I generally don't set the CATALINA_HOME environment variable unless I'm running multiple instances from the same install. The wrapper scripts will deduce the value from your current working directory.
 
Ja vardhan
Ranch Hand
Posts: 169
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur reply Ben.
I understood Tomcat was running.. but how come? I am getting error with startup.bat. That means am not able to start the Tomcat, then who started the Tomcat? Why its already in running mode? How to stop the Tomcat now?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The startup.bat file has a complimentary "shutdown.bat" file.
Just issue the "shutdown" command from the tomcat/bin directory.

If you're running on Windows, you might want to consider installing the ".exe" version which installs Tomcat as a service. This version doesn't rely on environment variables. Instead it store the needed settings in the registry.

There are valid reasons for each method.
 
Ja vardhan
Ranch Hand
Posts: 169
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using "shutdown.bat", the server is still in running mode.
-----------------------------------------
The startup.bat file has a complimentary "shutdown.bat" file.
Just issue the "shutdown" command from the tomcat/bin directory.
-------------------------------------------

I didnt get what u r saying:
----------------------------------------------
If you're running on Windows, you might want to consider installing the ".exe" version which installs Tomcat as a service. This version doesn't rely on environment variables. Instead it store the needed settings in the registry.

There are valid reasons for each method.
-------------------------------------------
Please clear me.
Thnkas for replying.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming tomcat is in e:\appservers\tomcat
From the command line, type:


As to the ".exe/service" install over the zipped version...

The .exe version is easier to install and doesn't require setting environment variables.
It also installs Tomcat as a service (which is how a production app on windows should be run) for you.
It gives you a set of Start menu items that you can use to start, stop, and configure Tomcat from a user friendly GUI screen.

The Zipped version is nice if you're developing and want to keep all of Tomcat in one directory. Especially if you are running multiple versions for multiple projects. You can control the environment by ammending the wrapper scripts or by creating your own wrapper scripts.
Having all of Tomcat in one directory also means that you can remove ALL of it with one delete command and not have to worry about lingering registry entries and start menu items.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic