public String getUrlExternalForm(final URL url) {
        val externalForm = url.toExternalForm();
        if (externalForm.contains("?")) {
            return externalForm + '&';
        }
        return externalForm + '?';
    }
Gets the URL external form supplemented by a question mark or an ampersand.

@param url the url
@return the url external form
support/cas-server-support-thymeleaf-core/src/main/java/org/apereo/cas/services/web/CasThymeleafTemplatesDirector.java