I try to show a pdf inside Vaadin iframe.
The app is deployed as a war file into Tomcat 10.
All the files are located outside the Tomcat folder structure.
After hours of research…
how to show a pdf inside an iFrame in a view?
Using JMIX 2.0.3 with newest plugin and IDEA version, openJDK 17…
I got a little bit further (but maybe in the wrong direction?)
I added a @Configuration and in there a resourceHandler
In the view I added an iFrame inside a formLayout…
And then I tried this coding, but I get an error: stream closed
when I try to set the iframe source.
the system.out:
true
VAADIN/dynamic/resource/1/e9e6882d-70ba-40f4-bcb9-1e304ee0c95d/0aatest.pdf
2023-09-10T22:24:16.252+02:00 ERROR 47960 — [nio-8080-exec-9] i.j.f.exception.UiExceptionHandlers : There is no io.jmix.flowui.exception.UiExceptionHandler can handle the exception
java.io.IOException: Stream closed
at java.base/java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:157) ~[na:na]
at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:244) ~[na:na]
at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:284) ~[na:na]
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:343) ~[na:na]…