We have a MHTML report generated by Cognos. We need to render this report inside our application's JSP itself. I am stuck with these two isses :
1. The report is generated outside location of WAR. So I cant directly import it into a JSP. Is there a way to import from a location outside the WAR ? After some googling, I found <c:import>. But it didnt work for me.
2. The second approach was to stream the file on to the JSP via the controller. The code is as below(this is also after some googling
I tried with a lot of permutations and combinations of setContentType and setHeader. They too didnt help. Whenever Content Type was set to "text/mhtml" / "text/mht", there would always be a pop up of the report instead of rendering it inline (Even after setting the header to "inline").
Has anybody rendered a MHTML report before ?