Why doesn'n create pdf-documents in java servlet? [duplicate]
问题 This question already has answers here : How can I serve a PDF to a browser without storing a file on the server side? (4 answers) Closed 3 years ago . I use iText/Pdfbox to create a PDF document. Everything works when I create the PDF using a standalone Java class like this: public static void main(String[] args){ ... ... ... } The document is created correctly. But I need create a PDF document from a Servlet. I paste the code into the get or post method, run that servlet on the server, but