JAVASERVERFACES-4120 Reproducer
This project is a reproducer for JAVASERVERFACES-4120: Ajax file
upload fails when com.sun.faces.namespaceParameters is set to true.
-
Clone the project:
git clone https://github.com/stiemannkj1/ajax-fileupload-reproducer.git -
Build the project with maven:
cd ajax-fileupload-reproducer && mvn clean install -
Deploy the project to tomcat:
cp target/ajax-fileupload-reproducer*.war $TOMCAT_HOME/webapps/ -
Verify that Ajax file upload works when
com.sun.faces.namespaceParametersis not set:-
Navigate to the webapp in the browser:
http://localhost:8080/ajax-fileupload-reproducer-1.0-SNAPSHOT/faces/index.xhtml
-
Click the Browse... button.
-
Select this
Readme.md. The text of this file should appear in the browser.
-
-
Uncomment the following line in the
web.xmlto setcom.sun.faces.namespaceParameterstotrue:<!-- <context-param> <param-name>com.sun.faces.namespaceParameters</param-name> <param-value>true</param-value> </context-param>--> -
Rebuild the project:
mvn clean install -
Redeploy the webapp:
rm -r $TOMCAT_HOME/webapps/ajax-fileupload-reproducer*; cp target/ajax-fileupload-reproducer*.war $TOMCAT_HOME/webapps/ -
Navigate to the webapp in the browser:
http://localhost:8080/ajax-fileupload-reproducer-1.0-SNAPSHOT/faces/index.xhtml
-
Click the Browse... button.
-
Select this
Readme.md.
If the bug still exists, an Ajax POST will occur, but the file text will not appear in the browser.
-
Fetch and checkout my fixed Mojarra branch:
cd mojarra~git/ && git remote add stiemannkj1 https://github.com/stiemannkj1/mojarra.git && git fetch stiemannkj1 ajax-fileupload-namespaced-params-fix && git checkout ajax-fileupload-namespaced-params-fix -
Build Mojarra according to the instructions here.
-
Change the version of Mojarra in the
pom.xmlto2.2.14-SNAPSHOT. -
Follow
Steps to Reproduce5-10. The text of theREADME.mdshould now appear in the browser.