com.vaadin.flow.shared.

Class VaadinUriResolver

    • Constructor Detail

      • VaadinUriResolver

        public VaadinUriResolver()
    • Method Detail

      • resolveVaadinUri

        protected String resolveVaadinUri(String uri,
                                          String frontendUrl,
                                          String servletToContextRoot)

        Translates a Vaadin URI to a URL that can be loaded by the browser. The following URI schemes are supported:

        • "context://" resolves to the application context root
        • "frontend://" - resolves to the build path where web components were compiled. Browsers supporting ES6 can receive different, more optimized files than browsers that only support ES5.
        • "base://" - resolves to the base URI of the page
        Any other URI protocols, such as http:// or https:// are passed through this method unmodified.

        Parameters:

        uri - the URI to resolve

        frontendUrl - the URL pointing to the path where the frontend files can be found. It is expected that different browsers receive different files depending on their capabilities. Can use the other protocols.

        servletToContextRoot - the relative path from the servlet path (used as base path in the client) to the context root

        Returns:

        the resolved URI