The code of Tobago 5 and Tobago 6 is almost identical. The difference is, that Tobago 5 uses Jakarta EE 8 and Tobago 6 uses Jakarta EE 10. There is no Jakarta EE 9 version.

Upgrade the dependencies to Jakarta EE 10.

In any case, JSF must be update to Faces 4.0. Depending on the implementation the new dependency could be:

- org.apache.myfaces.core:myfaces-api:2.x -> org.apache.myfaces.core:myfaces-api:4.x
- org.glassfish:jakarta.faces:2.x -> org.glassfish:jakarta.faces:4.x
- javax.faces:javax.faces-api:2.x -> jakarta.faces:jakarta.faces-api:4.x

There are probably other dependencies that need to be updated. For example, Servlet 6.0 and CDI 4.0.

Since Jakarta EE 9 the namespace has been changed from "javax" to "jakarta".

- Java imports: `import javax.*` must be replaced by `import jakarta.*`
- XHTML header: `<ui:composition xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets">`
  must be replaced by
  `<ui:composition xmlns:f="jakarta.faces.core" xmlns:ui="jakarta.faces.facelets">`
- web.xml context parameter names: `javax.faces.*` must be replaced by `jakarta.faces.*`

With a new Jakarta EE version, some XML headers need to be updated.

`<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd" version="2.3">`
must be replaced by
`<faces-config xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_4_0.xsd" version="4.0">`

For Servlet 6.0
`<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0">`
must be replaced by
`<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd" version="6.0">`

If using CDI:
`<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" version="2.0">`
must be replaced by
`<beans xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd" version="4.0">`