try
if ( ParameterAccessor.isReportParameterExist( request, ParameterAccessor.PARAM_REPORT_DOCUMENT ) )
	protected IViewerReportDesignHandle getDesignHandle(			HttpServletRequest request )	{		IViewerReportDesignHandle design = null;		IReportRunnable reportRunnable = null;		IReportDocument reportDocumentInstance = ReportEngineService				.getInstance( ).openReportDocument( this.reportDesignName,						this.reportDocumentName );		if ( reportDocumentInstance != null )		{			reportRunnable = reportDocumentInstance.getReportRunnable( );			// in frameset mode, parse parameter values from document file			// if the path is frameset, copy the parameter value from document			// to run the report. If the _document parameter from url is not			// null, means user wants to preview the document, copy the			// parameter from the document to do the preview.			if ( IBirtConstants.SERVLET_PATH_FRAMESET.equalsIgnoreCase( request					.getServletPath( ) ) )			{				this.parameterMap = reportDocumentInstance.getParameterValues( );			}			if ( ParameterAccessor.getParameter( request,					ParameterAccessor.PARAM_REPORT_DOCUMENT ) != null )				this.documentInUrl = true;			reportDocumentInstance.close( );		}		// if report runnable is null, then get it from design file		if ( reportRunnable == null )		{			try			{				// check the design file if exist				File file = new File( this.reportDesignName );				if ( file.exists( ) )				{					reportRunnable = ReportEngineService.getInstance( )							.openReportDesign( this.reportDesignName );				}				else if ( !ParameterAccessor.isWorkingFolderAccessOnly( ) )				{					// try to get resource from war package, when					// WORKING_FOLDER_ACCESS_ONLY set as false					this.reportDesignName = ParameterAccessor.getParameter(							request, ParameterAccessor.PARAM_REPORT );					InputStream is = request.getSession( ).getServletContext( )							.getResourceAsStream( this.reportDesignName );					reportRunnable = ReportEngineService.getInstance( )							.openReportDesign( is );				}			}			catch ( EngineException e )			{				this.exception = e;			}		}		if ( reportRunnable != null )		{			design = new BirtViewerReportDesignHandle(					IViewerReportDesignHandle.RPT_RUNNABLE_OBJECT,					reportRunnable );		}		else		{			design = new BirtViewerReportDesignHandle( null, reportDesignName );		}		return design;	}