@byxiaoxie8 月前

10/31
16:39
Home

修改/隐藏 Tomcat 版本号

##方法1
	在[lib]目录下创建文件夹
	org -> apache -> catalina -> util -> Serverinfo.properties
	将 [Serverinfo.properties] 里面的版本号修改掉或删除保存后运行即可

[Serverinfo.properties] 原文件内容
	# Licensed to the Apache Software Foundation (ASF) under one or more
	# contributor license agreements.  See the NOTICE file distributed with
	# this work for additional information regarding copyright ownership.
	# The ASF licenses this file to You under the Apache License, Version 2.0
	# (the "License"); you may not use this file except in compliance with
	# the License.  You may obtain a copy of the License at
	#
	#     http://www.apache.org/licenses/LICENSE-2.0
	#
	# Unless required by applicable law or agreed to in writing, software
	# distributed under the License is distributed on an "AS IS" BASIS,
	# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	# See the License for the specific language governing permissions and
	# limitations under the License.

	server.info=Apache Tomcat/8.5.93
	server.number=8.5.93.0
	server.built=Aug 23 2023 22:43:14 UTC

##方法2
	在 [lib] 找到 [catalina.jar] 使用压缩软件打开或解包也可以
	找到路径: org -> apache -> catalina -> util -> Serverinfo.properties
	和上面方法一样修改里面内容后重新打包回去 [catalina.jar] 即可

 

修改/隐藏 Tomcat 版本号

加载中……