Bug 143068 Update the way that viewer sets the image cache folder.
Use this code segment below to set image cache folder. HTMLRenderContext ctx = new HTMLRenderContext(); ctx.setImageDirectory("images"); HashMap map = new HashMap(); map.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT, ctx); task.setAppContext(map); The one related to 132063
viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/BirtViewerReportService.java
}
	}
	public ToC getTOC( String docName, String tocId, InputOptions options )
			throws ReportServiceException
	{
		IReportDocument doc = ReportEngineService.getInstance( )
				.openReportDocument( getReportDesignName( options ), docName );
		TOCNode node = null;
		if ( tocId != null )
		{
			node = doc.findTOC( tocId );
		}
		else
		{
			node = doc.findTOC( null );
		}
		if ( node == null )
		{
			throw new ReportServiceException(
					BirtResources
							.getString( ResourceConstants.REPORT_SERVICE_EXCEPTION_INVALID_TOC ) );
		}
		doc.close( );
		return transformTOCNode( node );
	}
	public long getPageCount( String docName, InputOptions options,
			OutputOptions outputOptions ) throws ReportServiceException
	{
		IReportDocument doc = ReportEngineService.getInstance( )
				.openReportDocument( getReportDesignName( options ), docName );