#29940

> What do those functions do, do they use the context or the request to calculate
> the URL, or do they use some functionality off it’s container, in this case Tomcat .

When httpRequest/httpResponse are set, PD4ML uses a request dispatcher to load local (probably, dynamic) resources, like “/WEBAPP/images/logo.png” or “/page.jsp”

It is done like that:

[language=java:4w4ss1xh]RequestDispatcher dispatcher = httpRequest.getRequestDispatcher(url);
BufferedHttpResponseWrapper wrapper = new BufferedHttpResponseWrapper(httpResponse, debugOn);
dispatcher.include(httpRequest, wrapper);

byte[] ret = wrapper.getOutputAsArray();[/language:4w4ss1xh]