How to start / restart Apache Tomcat on windows?

I recently installed Apache Tomcat 6 for Windows Vista, trying to teach myself Servlets / JSP.

If I try to start Tomcat by double-clicking the icon on my desktop (which displays on " C:\Program Files\Apache Software Foundation\tomcat6\bin\tomcat6.exe "), it opens a command line with many messages, showing that it stuck on a line such as "INFO: server start in 1244 ms." After this, nothing happens, no matter how long I wait.

The only way to start the server is to go to the task manager → Services → manually start Apache Tomcat 6. For each relocation, I have to stop and restart the web server in the same way.

Is this the only way to start / restart apache on Windows?

The first time I installed it, an icon appeared in the system tray, clicking it can start / stop the server. But this icon disappeared after the first use. I uninstalled / reinstalled apache. Again, the icon appeared and disappeared the next time it was accessed.

Is there a way to get the badge back forever, or is there a better way to do this?

+4
source share
1 answer

I am not familiar with apache, but you can run a Windows program programmatically using a simple VBScript file.

  • Create a new text file, but with the extension .vbs instead of .txt.
  • Paste the following code into the file:

    set WshShell = WScript.CreateObject("WScript.Shell")

    WshShell.Run "net start ""Name of Servcie Goes Here"" ", 7, True

  • Whenever you need to start a service, just click on the file.


NOTE. If you need to stop the service, this is simple:

 WshShell.Run "net stop ""Name of Service Goes Here"" ", 7, True 
0
source

All Articles