Class StaticContentUrlProvider

java.lang.Object
org.apache.ofbiz.widget.content.StaticContentUrlProvider

public class StaticContentUrlProvider extends Object
Generates URL strings for addressing static content based properties configured on an HttpRequest's website or configured properties in url.properties.
See Also:
  • Constructor Details

    • StaticContentUrlProvider

      public StaticContentUrlProvider(HttpServletRequest request)
      Create a new URL provider for given HttpServletRequest's website.
      Parameters:
      request - The HttpServletRequest request to look up the website for.
  • Method Details

    • pathAsContentUrlString

      public String pathAsContentUrlString(String resourcePath)
      Given a path to a static content resource, return the URL string that a client can use to retrieve that resource.
      Parameters:
      resourcePath - Path to static resource
      Returns:
      String representation of the URL which can be used to retrieve the static resource.