File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Service on Windows 2003 server" Watch "Tomcat Service on Windows 2003 server" New topic
Author

Tomcat Service on Windows 2003 server

zena sam
Ranch Hand

Joined: Apr 26, 2002
Posts: 41
Hi,
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 file.am 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: http://www.coderanch.com/t/81928/Tomcat/Tomcat-as-service
or do a search in the this forum - there has been a lot of post about this topic.
Rene
[ 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
zena sam
Ranch Hand

Joined: Apr 26, 2002
Posts: 41
Here's the command I have used....
set SERVICENAME=Apache
set JAVACLASSPATH=%CLASSPATH%
set JAVACLASSPATH=%JAVACLASSPATH%;"%CATALINA_HOME%\bin\bootstrap.jar"
set JAVACLASSPATH=%JAVACLASSPATH%;"%CATALINA_HOME%\common\lib\servlet.jar"
set JAVACLASSPATH=%JAVACLASSPATH%;"%JAVA_HOME%\lib\tools.jar"
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!
zena
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat Service on Windows 2003 server