简体   繁体   中英

How to migrate Java app from Tomcat 7/8/9 to Tomcat 10

Tomcat 10 came out recently and trying to simply deploy the apps. Since the Java EE 8 using javax.* package name spaces and Tomcat 10 uses Java EE 9 which using jakarta.* name spaces, it is difficult to migrate from tomcat 9 to 10. Is there any way or tool to do that? I think this is the same for tomcat 7/8 too.

There is a tool specific for this purpose you can find here . Although it is work in progress but you can give it a try.

There are couple of things to consider when migrating:

1: Code changes outside libraries - These are the class files you write and the classes that will be extracted to none lib folder.

2: Third party libraries - libraries your project use.

3: Server dependent libraries - Libraries like Servlet API, Server Pages, JSTL etc

Since this packaging name space change is relatively new, it will take time to get Tomcat 10 supportive third party libraries and web development frameworks. Until then with the tool we can change the occurrences of javax.* to jakarta.* manually. If you are focusing on deployment too, then there are options (-exclude) that can pass so library like folders will be skipped to save time in deployment phases.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM