The tutorial doesn't mention anything about setting content type or anything else (I presume the plugin will do all that automatically or maybe I am wrong). I have implemented exactly as per that tutorial.
Anyone with any idea as to what is happening or what needs to be done so that I can display the pdf in the browser or even get a link to the pdf on screen? I have searched the web and this forum but cant get anything specific with the struts2 jasperreport plugin.
1 point of note, I had problems in retrieving my .jrxml file when trying to compile into a jasper file. However, I do have a jasper file now and I presume it is compiled correctly.
My conosole outputs the following which makes me believe that my jasper file is compiled fine.
I'd check your browser's PDF settings first; normally it'll either display inline or ask you to download.
posted 10 years ago
I am able to view pdf documents in both IE & Firefox when coming across all pdf documents accross the Internet.
My firefox settings for all adobe acrobat documents was to display in firefox(I presume this is inlne). I since modified it to use Adobe Read however my problem before still persists when I try to use my struts2 action to display the pdf document.
Do you have any other suggestion I can try to solve this problem? As mentioned before my code is very simlar to that of the tutorial.
Without the actual code and/or configuration, it's impossible to help. We have several apps in production that use the JR plugin without incident (and without changing browser settings), so I'm not sure what else to suggest. Is the format result attribute being set?
I downloaded his war, deployed it in eclipse and it works fine. Pdf comes up no problem. That war uses struts2-jasperreports-plugin-126.96.36.199
I then copied over his class files, jasper files, etc over to my project which uses struts2-jasperreports-plugin-2.1.8 but I get the same problem as before!
I wonder Im i missing a jar or something else in my project.
I have the following jar files:
Im stumped as to why its not working!
posted 10 years ago
Just an update.. I did another test whereby I put my action class & other necessary code into the Bruce Phillips war, deployed it, tested it & it worked fine. the pdf is rendered and displayed ok.
This means that my code is ok, my compiled jasper file is ok. This leaves me thinking that I am defintely missing something when using struts2-jasperreports-plugin-2.1.8.jar.
Does anyone know what are the dependant jars & versions needed for struts 2.1.8 when trying to run struts2-jasperreports-plugin-2.1.8.jar?
lib/commons-*.jar (all the commons - except maybe for commons-logging)
Copy these jars over to your S2_WEBAPP/WEB-INF/lib directory, and add them to your classpath.