-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileDownload #9702
Comments
Tried ajax download in our setup and it returns empty file, logging the "correct" exception message complaining about view scoped. So that part doesn't work as advertised. Not very eager to switch hundreds of p:fileDownload uses to ajax and download via REST/RequestScoped as this will be major rework. I'd rather be happy with getting ajax="false" downloads working again. |
Hmm, testing in a special sandbox app on my local WildFly shows the same issue as in #6111 - server throws No enum constant com.sun.faces.context.ExternalContextImpl.PREDEFINED_COOKIE_PROPERTIES.SameSite |
|
Is this something to report to com.sun.jsf-impl authors? |
this exception is not a PF problem and needs to be fixed in mojarra |
Yep already reported and fixed: eclipse-ee4j/mojarra#5165 |
Describe the bug
Migrated from PF 10 to PF 12 (Elite). All our ajax="false" p:fileDownloads stopped working and instead of desired file content return jsf page html. Can't switch to ajax downloads as they are all linked to view scoped beans. We often use a combination of actionListener in commandButton creating the streamed content which was then set as value for p:fileDownload.
I tried to make a reproducer, but it works properly in the test code (jetty + old Java EE 8). However similar code fails on Wildfly 27 with Jakarta EE 10. Anyway, I'm attaching it.
The "Download No AL" and "Ajax Download No AL" buttons can be used to test that the actionListener preparing file actually works - on fresh page load file is null, thus those buttons will trigger throwing AbortProcessingException. The "Download AL" is the one that should be working normally, downloading the file without using Ajax - this is the combination which stopped working for us and returns jsf page html. The "Ajax Download AL" will download error page as the contents of the file saying "Error in streaming dynamic resource. Verify you are not using a @ViewScoped bean.".
How can I get the ajax="false" download to work again in our setup as it worked before. The only thing that changed was PF version, Wildfly version and JavaEE to JakartaEE.
Reproducer
No response
Expected behavior
No response
PrimeFaces edition
Elite
PrimeFaces version
12.0.2
Theme
default
JSF implementation
Mojarra
JSF version
4.0
Java version
11.0.17+8
Browser(s)
Firefox 108.0.2
The text was updated successfully, but these errors were encountered: