if ( ParameterAccessor.PARAM_FORMAT_HTM.equalsIgnoreCase( this.format ) ) { this.format = ParameterAccessor.PARAM_FORMAT_HTML; }   if ( !ParameterAccessor.validateFormat( this.format ) ) { this.exception = new Exception( BirtResources .getString( ResourceConstants.VIEWER_ERROR_UNSUPPORTEDFORMAT ) ); return; }
	protected void __init( HttpServletRequest request ) throws Exception	{		if ( ParameterAccessor.isGetImageOperator( request ) )		{			return;		}		this.category = "BIRT"; //$NON-NLS-1$		this.masterPageContent = ParameterAccessor				.isMasterPageContent( request );		this.isDesigner = ParameterAccessor.isDesigner( request );		this.bookmark = ParameterAccessor.getBookmark( request );		this.reportPage = String.valueOf( ParameterAccessor.getPage( request ) );		this.reportDocumentName = ParameterAccessor.getReportDocument( request );		this.reportDesignName = ParameterAccessor.getReport( request );		this.format = ParameterAccessor.getFormat( request );		// Support htm output format as html format		if ( ParameterAccessor.PARAM_FORMAT_HTM.equalsIgnoreCase( this.format ) )		{			this.format = ParameterAccessor.PARAM_FORMAT_HTML;		}		// Check the output format, if don't support it, throw exception		if ( !ParameterAccessor.validateFormat( this.format ) )		{			this.exception = new Exception(					BirtResources							.getString( ResourceConstants.VIEWER_ERROR_UNSUPPORTEDFORMAT ) );			return;		}		this.maxRows = ParameterAccessor.getMaxRows( request );		// Set preview report max rows		ReportEngineService.getInstance( ).setMaxRows( this.maxRows );		// Determine the report design and doc 's timestamp		processReport( request );		// Report title.		String title = null;		if ( title == null || title.trim( ).length( ) <= 0 )		{			title = BirtResources					.getString( ResourceConstants.BIRT_VIEWER_TITLE );		}		this.reportTitle = ParameterAccessor.htmlEncode( title );		this.__initParameters( request );	}