outputHandler = getOutputHandler( response, true );
outputHandler.setMimeTypeListener( listener );
IParameterProvider sessionParameters = new HttpSessionParameterProvider( session );
IPentahoRequestContext requestContext = PentahoRequestContextHolder.getRequestContext();
Map<String, IParameterProvider> parameterProviders = new HashMap<String, IParameterProvider>();
parameterProviders.put( IParameterProvider.SCOPE_REQUEST, requestParameters );
parameterProviders.put( IParameterProvider.SCOPE_SESSION, sessionParameters );
parameterProviders.put( "headers", headerParams ); //$NON-NLS-1$
parameterProviders.put( "path", pathParams ); //$NON-NLS-1$
SimpleUrlFactory urlFactory =
new SimpleUrlFactory( requestContext.getContextPath() + urlPath + "?" ); //$NON-NLS-1$ //$NON-NLS-2$
List<String> messages = new ArrayList<String>();
contentGenerator.setOutputHandler( outputHandler );
contentGenerator.setMessagesList( messages );
contentGenerator.setParameterProviders( parameterProviders );
contentGenerator.setSession( session );