File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat Service on Windows 2003 server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Service on Windows 2003 server" Watch "Tomcat Service on Windows 2003 server" New topic

Tomcat Service on Windows 2003 server

zena sam
Ranch Hand

Joined: Apr 26, 2002
Posts: 41
am running a batch file to create a tomcat service...
"%CATALINA_HOME%\bin\tomcat.exe" -install VFarm "%JAVA_HOME%\jre\bin\server\jvm.dll" -Djava.class.path="%CATALINA_HOME%\common\lib;%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar" -Dcatalina.home="%CATALINA_HOME%" -djava.home="%JAVA_HOME%\jre" %CATALINA_OPTS% -Xrs -start org.apache.catalina.startup.BootstrapService -params start -config "%CATALINA_HOME%\conf\server.xml" -stop org.apache.catalina.startup.BootstrapService -params stop -out "%CATALINA_HOME%\logs\stdout.log" -err "%CATALINA_HOME%\logs\stderr.log" -current "%CATALINA_HOME%"
are the contents of the able to create a service but it does not start....when I start the service it pops up a message...
"The tomcat service on Local computer started and stopped.Some services stop automtically if they have no work to do........."
how can I make the service work...
Thanks in advance!!
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

there are no option named '-config' - try removing it and uninstall/install again..
-config "%CATALINA_HOME%\conf\server.xml"
You can see the valid options by typing 'tomcat /?' in a DOS box.
you could also look at this post:
or do a search in the this forum - there has been a lot of post about this topic.
[ July 30, 2003: Message edited by: Rene Larsen ]

Regards, Rene Larsen
Dropbox Invite
zena sam
Ranch Hand

Joined: Apr 26, 2002
Posts: 41
Thanks Rene!
am not sure where am going wrong...I tried creating a service from command line and by running the command, the service gets created but I still have a problem in starting the service...Any ideas where am wrong,...
Thanks in Advance!!
zena sam
Ranch Hand

Joined: Apr 26, 2002
Posts: 41
Here's the command I have used....
tomcat.exe -install "%SERVICENAME%" "%JAVA_HOME%\jre\bin\server\jvm.dll" -Djava.class.path="%JAVACLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" -Xrs -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out "%CATALINA_HOME%\logs\catalina.out" -err "%CATALINA_HOME%\logs\stderr.log" -current "%CATALINA_HOME%\bin"...
Any idea as to how I can have the service started after installing the service...
Thanks in Advance!
I agree. Here's the link:
subject: Tomcat Service on Windows 2003 server
It's not a secret anymore!