直接下载tomcat的win32版本,有安装程序的,安装中,会询问你是否做为服务(对NT/2K/XP有效)来启动,选择“是”就可以了。

解决方案 »

  1.   

    可以的
    The Jakarta NT service is an executable that wraps the Tomcat servlet container and executes it in the background as an NT service. To install it you will need to:Get a hold on the NT executable (jk_nt_service.exe,需要这个程序,没有发短消息告诉我或自己去下载) 
    Download the executable from the win32/i386 directory found where you downloaded the Tomcat binary distribution. For those using Netscape as your browser, try downloading a zip version of the file, if available. There can be problems using Netscape to download DLL files. 
    Customize a properties file that provides the service with Tomcat information (wrapper.properties//这个文件已经有了在目录conf下面). 
    Locate the wrapper.properties template file in your Tomcat conf directory. 
    Update the wrapper.tomcat_home property to point at your tomcat home. 
    Update the wrapper.java_home property to point at your Java home. 
    Install jk_nt_service by running it with the -i flag. 
    Execute jk_nt_service -I <name of service> <path to updated wrapper properties>
    (加入服务jk_nt_service -I <name of service> <path to updated wrapper properties>) 
    <name of service//服务的名字,随便起> should be a single word (without and spaces) such as Jakarta 
    <path to updated wrapper properties//指向wrapper文件的目录> should point to your wrapper.properties file (and the service will check it's existence.) 
    For example, a valid command line can be jk_nt_service -I Jakarta wrapper.properties 
    Start tomcat as a service. 
    From the command line, execute net start <name of service> (e.g. net start Jakarta) 
    From the NT services applet, highlight your service and press start. 
    Note: If the log file location in your wrapper.properties file points to the logs directory, and the logs directory doesn't yet exist, manually create it before starting the service. 
    Stop Tomcat as a service. 
    From the command line, execute net stop <name of service> (e.g. net stop Jakarta) 
    From the NT services applet, highlight your service and press stop. 
    Special note: The Tomcat service is using AJPV12 to perform clean shutdown and you should make sure that an AJPV12 connector is defined in your server.xml. In the absence of a configured AJPV12 port the Tomcat service will kill Tomcat abruptly (that is murder it) without giving it a chance to clean up. Notice for JDK 1.3 users:  There is a known problem in JDK 1.3 that affects Java applications being run as Windows NT services.  The bug causes the service to terminate when the currently logged in user logs out.  The simplest way to work around this problem is to use JDK 1.2.  If your application requires JDK 1.3 features then you may want to look into javaserv or JavaService.  Users have reported success with both of these packages but there may be others that work as well. (最好用JDK1.4,因为JDK1.3回出错的)To remove the installed service, execute jk_nt_service -R <name of service>
    (取消服务 jk_nt_service -R <name of service>)
      

  2.   

    右击开始,打开,启动,把startup拖进来就可以