1.下载http://www.eu.apache.org/dist/jakarta/tomcat-5/ 这里注意,在jakarta-tomcat-5.0.28.exe以前是有默认的admin模块,在jakarta-tomcat-5.5.9.exe则没有安装默认的admin模块,这时http://127.0.0.1:8080/admin打开时则会出现 Tomcat's administration web application is no longer installed by default. Download and install the "admin" package to use it. 因此我们现在需要下载"admin"package 包 把jakarta-tomcat-5.5.x.zip 与 jakarta-tomcat-5.5.x-compat.zip 与 jakarta-tomcat-5.5.x-admin.zip 三个文件解压在同一个目录中 (如果使用jdk1.4,才需要compat.zip用jdk1.5就可以免了这个。)
<!-- Security is active on entire directory --> <security-constraint> <display-name>Tomcat Server Configuration Security Constraint</display-name> <web-resource-collection> <web-resource-name>Protected Area</web-resource-name> <!-- Define the context-relative URL(s) to be protected --> <url-pattern>*.jsp</url-pattern> <url-pattern>*.do</url-pattern> <url-pattern>*.html</url-pattern> </web-resource-collection> <auth-constraint> <!-- Anyone with one of the listed roles may access this area --> <role-name>admin</role-name> </auth-constraint> </security-constraint>