Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
How to: Tomcat 5.0.16 as Windows Service

How to: Tomcat 5.0.16 as Windows Service

2003-12-23       - By Jacob Kjome

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Thanks for the script, Bill.  I've been looking for something that actually
works and this finally does....almost....

The script is missing one important thing.  It doesn't include
%JAVA_HOME%\lib\tools.jar in the --ImagePath which causes JSP compilation
to fail.  Attached is a modified script that fixes that and adds
-Djava.io.tmpdir and adds some -Xms and -Xmx stuff.  BTW, I tried adding
-server, but the service wouldn't start when it was added.  Any idea
why?  How else do I specify Tomcat to use the -server JVM rather than the
default -client?

Jake

At 08:47 PM 12/22/2003 -0800, you wrote:
>One of the other developers added the attached .bat file to make it easier
>to install as a service (I renamed the attachment to '.txt', since a lot of
>mail servers strip '.bat' attachments :).  rename it back to '.bat', and see
>if it help.
>
>   Usage: service.bat install/remove [service_name]
>
>service_name defaults to Tomcat5 if not specified.
>
>"Merrill Cornish" <merrill.cornish@(protected)> wrote in message
>news:16035281.1072104979781.JavaMail.root@(protected)
> > Bill,
> >
> >    Yes, I should have thought of the --StdOutFile and --StdErrorFile
>arguments.  However, specifying them does no good.  The files are created,
>but they are empty.
> >
> > Merrill
>
>
>
>
>
>
>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
>For additional commands, e-mail: tomcat-user-help@(protected)

@(protected) off
if "%OS%" == "Windows_NT" setlocal
rem -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
rem NT Service Install/Uninstall script
rem
rem Options
rem install                Install the service using Tomcat5 as service name.
rem                        Service is installed using default settings.
rem remove                 Remove the service from the System.
rem
rem name        (optional) If the second argument is present it is considered
rem                        to be new service name                              
           
rem
rem $Id: service.bat,v 1.1 2003/12/22 13:48:52 mturk Exp $
rem -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --

rem Guess CATALINA_HOME if not defined
set CURRENT_DIR=%cd%
if not "%CATALINA_HOME%" == "" goto gotHome
set CATALINA_HOME=%cd%
if exist "%CATALINA_HOME%\bin\tomcat.exe" goto okHome
rem CD to the upper dir
cd ..
set CATALINA_HOME=%cd%
:gotHome
if exist "%CATALINA_HOME%\bin\tomcat.exe" goto okHome
echo The tomcat.exe was not found...
echo The CATALINA_HOME environment variable is not defined correctly.
echo This environment variable is needed to run this program
goto end
:okHome

set EXECUTABLE=%CATALINA_HOME%\bin\tomcat.exe

rem Set default Service name
set SERVICE_NAME=Tomcat5

if "%1" == "" goto displayUsage
if "%2" == "" goto setServiceName
set SERVICE_NAME=%2
:setServiceName
if %1 == install goto doInstall
if %1 == remove goto doRemove
echo Unknown parameter "%1"
:displayUsage
echo
echo Usage: service.bat install/remove [service_name]
goto end

:doRemove
rem Remove the service
%EXECUTABLE% //DS//%SERVICE_NAME%
echo The service '%SERVICE_NAME%' has been removed
goto end

:doInstall
rem Install the service
%EXECUTABLE% //IS//%SERVICE_NAME% --DisplayName "Apache Tomcat" --Description
"Apache Tomcat Server - http://jakarta.apache.org/tomcat/"  --Install "
%EXECUTABLE%" --ImagePath "%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin
\bootstrap.jar" --StartupClass org.apache.catalina.startup.Bootstrap Source code of org.apache.catalina.startup.Bootstrap.html>org.apache.catalina.startup.Bootstrap Source code of org.apache.catalina.startup.Bootstrap org.apache.catalina.startup.Bootstrap Source code of org.apache.catalina.startup.Bootstrap.java.html>Source code of <a href=http://www.docjar.com/docs/api/org/apache/catalina/startup/Bootstrap.html>org.apache.catalina.startup.Bootstrap</a> <a href=http://www.docjar.com/html/api/org/apache/catalina/startup/Bootstrap.java.html><img src=/j.gif alt=' border=0>;main;start
--ShutdownClass org.apache.catalina.startup.Bootstrap Source code of org.apache.catalina.startup.Bootstrap.html>org.apache.catalina.startup.Bootstrap Source code of org.apache.catalina.startup.Bootstrap org.apache.catalina.startup.Bootstrap Source code of org.apache.catalina.startup.Bootstrap.java.html>Source code of <a href=http://www.docjar.com/docs/api/org/apache/catalina/startup/Bootstrap.html>org.apache.catalina.startup.Bootstrap</a> <a href=http://www.docjar.com/html/api/org/apache/catalina/startup/Bootstrap.java.html><img src=/j.gif alt=' border=0>;main;stop --Java java -
-Startup manual
rem Set extra parameters
%EXECUTABLE% //US//%SERVICE_NAME% --JavaOptions -Dcatalina.home="\"%CATALINA
_HOME%\""#-Djava.endorsed.dirs="\"%CATALINA_HOME%\common\endorsed\""#-Djava.io
.tmpdir="\"%CATALINA_HOME%\temp\""#-Xms32m#-Xmx256m#-Xrs --StdOutputFile "
%CATALINA_HOME%\logs\stdout.log" --StdErrorFile "%CATALINA_HOME%\logs\stderr.log
" --WorkingPath "%CATALINA_HOME%\bin"
echo The service '%SERVICE_NAME%' has been installed

:end
cd %CURRENT_DIR%


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.