Klasse EsiContentResolver

java.lang.Object
de.otto.esidialect.EsiContentResolver

public class EsiContentResolver extends Object
Content resolver for esi-includes fetching the content of an include's source url.

The content of the url of the src-attribute is fetched and inserted into the page flow, just as a esi-include processor like e.g.varnish would do.

If the onerror-attribute is set to continue, any errors that occur while fetching the document are ignored.
Otherwise an error message is output into the pageflow.

  • Konstruktordetails

    • EsiContentResolver

      public EsiContentResolver(Fetch fetch, String prefixForRelativePath)
      Parameter:
      fetch - a Function that takes the url to be fetched and returns a response object with its content and status
      prefixForRelativePath - optional, may be null. Protocol and hostname to prefix a relative url in the src-attribute. E.g. "http://www.otto.de"
  • Methodendetails

    • fetch

      public String fetch(String src, String templateName, boolean continueOnError)