Tomcat 4的下载和安装不用我再多说了吧,精华区也有。
可参见()
InstallTomcatService.bat
@echo off
rem
rem SERVICE_NAME
rem name of the service will be installed
rem JVM_DLL_TO_USE
rem full path of jvm.dll, used by tomcat service
rem TOMCAT_SERVICE_LOG_PATH
rem log file save path.
rem
rem set Environment Variables
rem
set SERVICE_NAME=Jakarta-Tomcat4.0.1
set JVM_DLL_TO_USE=%JAVA_HOME%\jre\bin\classic\jvm.dll
set TOMCAT_SERVICE_LOG_PATH=%CATALINA_HOME%\bin
rem
rem install service
rem
%CATALINA_HOME%\bin\tomcat -install %SERVICE_NAME% %JVM_DLL_TO_USE% -Djava.class.path=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar -Dcatalina.base="%CATALINA_HOME%" -Dcatalina.home="%CATALINA_HOME%" -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out %TOMCAT_SERVICE_LOG_PATH%\tomcat_System_out.log -err %TOMCAT_SERVICE_LOG_PATH%\tomcat_System_err.log -current %CATALINA_HOME%\bin
rem
rem clear Environment Variables
rem
set SERVICE_NAME=
set JVM_DLL_TO_USE=
set TOMCAT_SERVICE_LOG_PATH=
UninstalTomcatSservice.bat
@echo off
rem
rem SERVICE_NAME
rem name of the service will be uninstalled
rem
rem set Environment Variables
rem
set Service_Name=Jakarta-Tomcat4.0.1
rem
rem uninstall service
rem
%CATALINA_HOME%\bin\tomcat -uninstall %Service_Name%
rem
rem clear Environment Variables
rem
set Service_Name=
以上是两个bat文件的内容,你可能会根据你的需要来改动。一般情况下只需要改动JVM_DLL_TO_USE参数即可。如何修改可参考文件中已有内容。
附:我觉得Tomcat4确实是一个非常优秀的JSP Engine, 无论是从速度,易用性,还是从新版本Servlet规范的支持度上说,都比Tomcat 3.2要强很多,而且在软件兼容性上要比Jrun, Resin等要强上很多。最重要的,它还是一个免费的产品,和同样免费的JBoss(EJB Server)的结合应该是对EJB有需要又很穷的公司的一个不错的选择。
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/