In j2ee, reports are generated using Jasperreports. The arial font is set; on the local machine (Tomcat 9, Windows 7), reports in pdf are generated correctly , and when deployed on the server (Tomcat 9, MS-Server 2012), Russian characters are not reproduced. Code

response.setContentType("application/pdf"); reportFileName = URLEncoder.encode(reportFileName, "UTF8"); response.setHeader("Content-Disposition", "attachment; filename*=\"utf-8'" + reportFileName + "." + extension + "\""); JRPdfExporter pdfExporter = new JRPdfExporter(); pdfExporter.setExporterInput(new SimpleExporterInput(print)); pdfExporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outputStream)); SimplePdfExporterConfiguration configuration = new SimplePdfExporterConfiguration(); configuration.setCreatingBatchModeBookmarks(true); pdfExporter.setConfiguration(configuration); pdfExporter.exportReport(); 

faces-config.xml

 <application> <locale-config> <default-locale>ru</default-locale> <supported-locale>en</supported-locale> </locale-config> </application> 

Has anyone come across?

    1 answer 1

    Everything turned out to be simple. When deploying Tomcat, there was no temp folder on the server. Created by hand, and it all worked. For Linux, when running Tomcat not under the system account, you need to check the permissions for this folder.