Package de.otto.esidialect
Class EsiContentResolver
- java.lang.Object
-
- de.otto.esidialect.EsiContentResolver
-
public class EsiContentResolver extends java.lang.ObjectContent 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 tocontinue, any errors that occur while fetching the document are ignored.
Otherwise an error message is output into the pageflow.
-
-
Constructor Summary
Constructors Constructor Description EsiContentResolver(Fetch fetch, java.lang.String prefixForRelativePath)
-
Method Summary
Modifier and Type Method Description java.lang.Stringfetch(java.lang.String src, java.lang.String templateName, boolean continueOnError)
-
-
-
Constructor Detail
-
EsiContentResolver
public EsiContentResolver(Fetch fetch, java.lang.String prefixForRelativePath)
- Parameters:
fetch- aFunctionthat takes the url to be fetched and returns a response object with its content and statusprefixForRelativePath- optional, may be null. Protocol and hostname to prefix a relative url in thesrc-attribute. E.g."http://www.otto.de"
-
-