private static Path fileSystemDocBase(Path rootDir, String relativePath) {
        // Append the specified docBase to the root directory to build the actual docBase on file system.
        String fileSystemDocBase = rootDir.toString();
        relativePath = relativePath.replace('/', File.separatorChar);
        if (fileSystemDocBase.endsWith(File.separator)) {
            if (relativePath.startsWith(File.separator)) {
                fileSystemDocBase += relativePath.substring(1);
            } else {
                fileSystemDocBase += relativePath;
            }
        } else {
            if (relativePath.startsWith(File.separator)) {
                fileSystemDocBase += relativePath;
            } else {
                fileSystemDocBase = fileSystemDocBase + File.separatorChar + relativePath;
            }
        }

        return Paths.get(fileSystemDocBase);
    }
Creates a new {@link TomcatServiceBuilder} with the web application at the specified document base,
which can be a directory or a JAR/WAR file.
tomcat10/src/main/java/com/linecorp/armeria/server/tomcat/TomcatService.java