Tomcat10无法加载webapps下的项目

================================

©Copyright 蕃薯耀 2021-12-27

https://www.cnblogs.com/fanshuyao/

一、Tomcat10无法加载webapps下的项目的原因

Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 without changes.

Tomcat 10.0.14 Released
The Apache Tomcat Project is proud to announce the release of version 10.0.14 of Apache Tomcat. This release implements specifications that are part of the Jakarta EE 9 platform.
 
Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 without changes. Java EE based applications designed for Tomcat 9 and earlier may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat will automatically convert them to Jakarta EE and copy them to the webapps directory. This conversion is performed using the Apache Tomcat migration tool for Jakarta EE tool which is also available as a separate download for off-line use.
 
The notable changes in this release are:
 
Provide protection against a known OS bug that causes the acceptor to report an incoming connection more than once.
Implement a workaround for a JVM bug that can trigger a file descriptor leak when using multi-part upload and the application does not explicitly close an input stream for an uploaded file that was cached on disk.
Fix exceptions when the security manager is enabled and the first request received after starting is an HTTP request to a TLS enabled NIO2 connector.
Full details of these changes, and all the other changes, are available in the Tomcat 10 changelog.

翻译:

在 Tomcat 9 及更早版本上运行的应用程序如果不进行更改,将无法在 Tomcat 10 上运行。

 

二、Tomcat10无法加载webapps下的项目的解决方法

如果需要,则需要进行转换,转换工具下载地址: 

Tomcat Migration Tool for Jakarta EE Software

https://tomcat.apache.org/download-migration.cgi

下载的Jar包为:

jakartaee-migration-1.0.0-shaded.jar

执行的命令:

java -jar jakartaee-migration-1.0.0-shaded.jar  [源文件]   [编译后的目标文件]

示例:

 
java -jar jakartaee-migration-1.0.0-shaded.jar C:\Users\islee\Desktop\0\warehouse.war C:\Users\islee\Desktop\0\1\warehouse.war

(时间宝贵,分享不易,捐赠回馈,^_^)

================================

©Copyright 蕃薯耀 2021-12-27

https://www.cnblogs.com/fanshuyao/

今天越懒,明天要做的事越多。
原文地址:https://www.cnblogs.com/fanshuyao/p/15736280.html