assert ParameterAccessor.PARAM_FORMAT_PDF .equalsIgnoreCase( ParameterAccessor.getFormat( request ) ); response.setContentType( "application/pdf" ); String filename = ParameterAccessor.generateFileName( request ); response .setHeader( "Content-Disposition", "inline; filename=\"" + filename + "\"" );
String format = ParameterAccessor.getFormat( request ); if ( ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase( format ) ) { response.setContentType( "application/pdf" ); String filename = ParameterAccessor.generateFileName( request ); response .setHeader( "Content-Disposition", "inline; filename=\"" + filename + "\"" ); } else { String mimeType = ReportEngineService.getInstance( ).getMIMEType( format ); if ( mimeType != null && mimeType.length( ) > 0 ) response.setContentType( mimeType + ";charset=utf-8" ); else response.setContentType( "text/html;charset=utf-8" ); response.setHeader( "cache-control", "no-cache" ); }
	protected void doPreService( HttpServletRequest request,			HttpServletResponse response ) throws ServletException, IOException	{		assert ParameterAccessor.PARAM_FORMAT_PDF				.equalsIgnoreCase( ParameterAccessor.getFormat( request ) );		response.setContentType( "application/pdf" ); //$NON-NLS-1$		String filename = ParameterAccessor.generateFileName( request );		response				.setHeader(						"Content-Disposition", "inline; filename=\"" + filename + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$	}