private static String convertServletPath(final HttpServletRequest req,
                                             final HttpServletResponse resp,
                                             final String servletPath) {
        String newUri = stripLegacyParts(servletPath);

        // Add on any params
        final Map<String, String[]> parameterMap = req.getParameterMap();
        if (!parameterMap.isEmpty()) {
            newUri += "?";
            final String paramStr = parameterMap.entrySet().stream()
                    .flatMap(entry -> Arrays.stream(entry.getValue())
                            .map(val -> Map.entry(entry.getKey(), val)))
                    .map(entry -> entry.getKey() + "=" + entry.getValue())
                    .collect(Collectors.joining("&"));
            newUri += paramStr;
            newUri = resp.encodeRedirectURL(newUri);
        }
        return newUri;
    }
Re-directs legacy paths to their new locations.
/stroom/dashboard => /dashboard
/stroom/noauth/swagger-ui => /swagger-ui
stroom-core/src/main/java/stroom/core/servlet/RedirectServlet.java