I am having an Action class in struts2 application and i want to display a docx file to the user. When i load the file with InputStream the file opens without problem
fileStream = new DataInputStream(
new FileInputStream("d:/deleme/sample.docx"));
The file of docx is about 26Kb and 7 pages. but when i add the following statement in Action
WordprocessingMLPackage wordMLPackage =
WordprocessingMLPackage.load(new FileInputStream(new java.io.File("d:/deleme/sample.docx")));
with no other modification to the previews code tomcat crashes with
Caused by: java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method)
How can i work docx with an action (google did not helped at all)