p:fileUpload method is not called in spring bean
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
This question concerns the upload and processing of CSV data in Spring Framework, using Primefaces upload, in order to create new entries in the database.
I've built my XHTML code on the template from Primefaces. When I click the Submit button, the uploadDevices method should be called, but I figured out that the method is never entered. When I remove the ajax="false" statement, the method is called, but throws a Nullpointer exception at the Inputstream, so apparently the file is not received.
Does anybody have advice on what to do? What does the ajax statement do, that prevents the method from being called?
Any help is very much appreciated.
devices.xhtml
<h:form enctype="multipart/form-data" style="margin-bottom:20px">
<p:growl id="messages" showDetail="true" />
<p:fileUpload value="#{fileUploadView.file}" ajax="false" mode="simple" skinSimple="true" allowTypes="/(.|/)(csv)$/"/>
<p:commandButton value="Submit" ajax="false" action="#{fileUploadView.uploadDevices()}" disabled="false" />
</h:form>
FileUploadView.java
@Component
@Scope("view")
public class FileUploadView {
private UploadedFile file;
// plus getter and setter
@Autowired
private DeviceService deviceService;
private Device device;
public void uploadDevices() {
final CSVParser parser = new CSVParserBuilder().withSeparator(',').withIgnoreQuotations(true).build();
final BufferedReader fileReader = new BufferedReader(new InputStreamReader(file.getInputstream()));
}
ajax spring jsf primefaces
add a comment |
This question concerns the upload and processing of CSV data in Spring Framework, using Primefaces upload, in order to create new entries in the database.
I've built my XHTML code on the template from Primefaces. When I click the Submit button, the uploadDevices method should be called, but I figured out that the method is never entered. When I remove the ajax="false" statement, the method is called, but throws a Nullpointer exception at the Inputstream, so apparently the file is not received.
Does anybody have advice on what to do? What does the ajax statement do, that prevents the method from being called?
Any help is very much appreciated.
devices.xhtml
<h:form enctype="multipart/form-data" style="margin-bottom:20px">
<p:growl id="messages" showDetail="true" />
<p:fileUpload value="#{fileUploadView.file}" ajax="false" mode="simple" skinSimple="true" allowTypes="/(.|/)(csv)$/"/>
<p:commandButton value="Submit" ajax="false" action="#{fileUploadView.uploadDevices()}" disabled="false" />
</h:form>
FileUploadView.java
@Component
@Scope("view")
public class FileUploadView {
private UploadedFile file;
// plus getter and setter
@Autowired
private DeviceService deviceService;
private Device device;
public void uploadDevices() {
final CSVParser parser = new CSVParserBuilder().withSeparator(',').withIgnoreQuotations(true).build();
final BufferedReader fileReader = new BufferedReader(new InputStreamReader(file.getInputstream()));
}
ajax spring jsf primefaces
Does it work if you make it a jsf or cdi managed bean? And remove which ajax=false?
– Kukeltje
Jan 4 at 19:53
I tried to make it a [at]ManagedBean [at]ViewScoped, but that didn't do anything. When I remove the ajax="false" in p:commandButton, it enters the bean method but throws a Nullpointer Exception where file is mentioned first, so i suppose the is no file
– Dreana
Jan 6 at 10:54
@ManagedBean
is not a CDI managed bean, that is@Named
(with the corresponding scopes, pay attention to those), Theajax="false"
on the commandButton is needed in this case, the one on the upload can be removed. And if you run in jsf development mode, any errors?
– Kukeltje
Jan 6 at 10:57
add a comment |
This question concerns the upload and processing of CSV data in Spring Framework, using Primefaces upload, in order to create new entries in the database.
I've built my XHTML code on the template from Primefaces. When I click the Submit button, the uploadDevices method should be called, but I figured out that the method is never entered. When I remove the ajax="false" statement, the method is called, but throws a Nullpointer exception at the Inputstream, so apparently the file is not received.
Does anybody have advice on what to do? What does the ajax statement do, that prevents the method from being called?
Any help is very much appreciated.
devices.xhtml
<h:form enctype="multipart/form-data" style="margin-bottom:20px">
<p:growl id="messages" showDetail="true" />
<p:fileUpload value="#{fileUploadView.file}" ajax="false" mode="simple" skinSimple="true" allowTypes="/(.|/)(csv)$/"/>
<p:commandButton value="Submit" ajax="false" action="#{fileUploadView.uploadDevices()}" disabled="false" />
</h:form>
FileUploadView.java
@Component
@Scope("view")
public class FileUploadView {
private UploadedFile file;
// plus getter and setter
@Autowired
private DeviceService deviceService;
private Device device;
public void uploadDevices() {
final CSVParser parser = new CSVParserBuilder().withSeparator(',').withIgnoreQuotations(true).build();
final BufferedReader fileReader = new BufferedReader(new InputStreamReader(file.getInputstream()));
}
ajax spring jsf primefaces
This question concerns the upload and processing of CSV data in Spring Framework, using Primefaces upload, in order to create new entries in the database.
I've built my XHTML code on the template from Primefaces. When I click the Submit button, the uploadDevices method should be called, but I figured out that the method is never entered. When I remove the ajax="false" statement, the method is called, but throws a Nullpointer exception at the Inputstream, so apparently the file is not received.
Does anybody have advice on what to do? What does the ajax statement do, that prevents the method from being called?
Any help is very much appreciated.
devices.xhtml
<h:form enctype="multipart/form-data" style="margin-bottom:20px">
<p:growl id="messages" showDetail="true" />
<p:fileUpload value="#{fileUploadView.file}" ajax="false" mode="simple" skinSimple="true" allowTypes="/(.|/)(csv)$/"/>
<p:commandButton value="Submit" ajax="false" action="#{fileUploadView.uploadDevices()}" disabled="false" />
</h:form>
FileUploadView.java
@Component
@Scope("view")
public class FileUploadView {
private UploadedFile file;
// plus getter and setter
@Autowired
private DeviceService deviceService;
private Device device;
public void uploadDevices() {
final CSVParser parser = new CSVParserBuilder().withSeparator(',').withIgnoreQuotations(true).build();
final BufferedReader fileReader = new BufferedReader(new InputStreamReader(file.getInputstream()));
}
ajax spring jsf primefaces
ajax spring jsf primefaces
edited Jan 4 at 19:54
Kukeltje
9,37041439
9,37041439
asked Jan 4 at 11:43
DreanaDreana
175
175
Does it work if you make it a jsf or cdi managed bean? And remove which ajax=false?
– Kukeltje
Jan 4 at 19:53
I tried to make it a [at]ManagedBean [at]ViewScoped, but that didn't do anything. When I remove the ajax="false" in p:commandButton, it enters the bean method but throws a Nullpointer Exception where file is mentioned first, so i suppose the is no file
– Dreana
Jan 6 at 10:54
@ManagedBean
is not a CDI managed bean, that is@Named
(with the corresponding scopes, pay attention to those), Theajax="false"
on the commandButton is needed in this case, the one on the upload can be removed. And if you run in jsf development mode, any errors?
– Kukeltje
Jan 6 at 10:57
add a comment |
Does it work if you make it a jsf or cdi managed bean? And remove which ajax=false?
– Kukeltje
Jan 4 at 19:53
I tried to make it a [at]ManagedBean [at]ViewScoped, but that didn't do anything. When I remove the ajax="false" in p:commandButton, it enters the bean method but throws a Nullpointer Exception where file is mentioned first, so i suppose the is no file
– Dreana
Jan 6 at 10:54
@ManagedBean
is not a CDI managed bean, that is@Named
(with the corresponding scopes, pay attention to those), Theajax="false"
on the commandButton is needed in this case, the one on the upload can be removed. And if you run in jsf development mode, any errors?
– Kukeltje
Jan 6 at 10:57
Does it work if you make it a jsf or cdi managed bean? And remove which ajax=false?
– Kukeltje
Jan 4 at 19:53
Does it work if you make it a jsf or cdi managed bean? And remove which ajax=false?
– Kukeltje
Jan 4 at 19:53
I tried to make it a [at]ManagedBean [at]ViewScoped, but that didn't do anything. When I remove the ajax="false" in p:commandButton, it enters the bean method but throws a Nullpointer Exception where file is mentioned first, so i suppose the is no file
– Dreana
Jan 6 at 10:54
I tried to make it a [at]ManagedBean [at]ViewScoped, but that didn't do anything. When I remove the ajax="false" in p:commandButton, it enters the bean method but throws a Nullpointer Exception where file is mentioned first, so i suppose the is no file
– Dreana
Jan 6 at 10:54
@ManagedBean
is not a CDI managed bean, that is @Named
(with the corresponding scopes, pay attention to those), The ajax="false"
on the commandButton is needed in this case, the one on the upload can be removed. And if you run in jsf development mode, any errors?– Kukeltje
Jan 6 at 10:57
@ManagedBean
is not a CDI managed bean, that is @Named
(with the corresponding scopes, pay attention to those), The ajax="false"
on the commandButton is needed in this case, the one on the upload can be removed. And if you run in jsf development mode, any errors?– Kukeltje
Jan 6 at 10:57
add a comment |
2 Answers
2
active
oldest
votes
Two common things people forget from the users guide. Don't forget "Faces Servlet" has to match your Servlet name of your Faces Servlet in web.xml
In your web.xml
<!-- Primefaces required for FileUploads to work -->
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
In your pom.xml add Commons Upload dependency.
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
I wrote a 'patch' for the showcase once to have these things visible in there. Not sure where it ended up, might be that I never submitted it. Or at least a reference to the documentation would be of great help
– Kukeltje
Jan 4 at 14:57
Thanks for you response. That did not fix my problem though.
– Dreana
Jan 4 at 17:44
add a comment |
Ok, so what solved my problem in the end was to add these methods in my Servlet Configurations, and now the Upload works just fine:
@Bean
public ServletRegistrationBean facesServletRegistratiton() {
ServletRegistrationBean registration = new ServletRegistrationBean(new FacesServlet(), new String { "*.xhtml" });
registration.setName("Faces Servlet");
registration.setLoadOnStartup(1);
return registration;
}
@Bean
public FilterRegistrationBean facesUploadFilterRegistration() {
FilterRegistrationBean registrationBean = new FilterRegistrationBean(new FileUploadFilter(), facesServletRegistratiton());
registrationBean.setName("PrimeFaces FileUpload Filter");
registrationBean.addUrlPatterns("/*");
registrationBean.setDispatcherTypes(DispatcherType.FORWARD, DispatcherType.REQUEST);
return registrationBean;
}
@Bean
public ServletContextInitializer servletContextInitializer() {
return new ServletContextInitializer() {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
servletContext.setInitParameter("primefaces.UPLOADER", "commons");
}
};
}
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54038314%2fpfileupload-method-is-not-called-in-spring-bean%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Two common things people forget from the users guide. Don't forget "Faces Servlet" has to match your Servlet name of your Faces Servlet in web.xml
In your web.xml
<!-- Primefaces required for FileUploads to work -->
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
In your pom.xml add Commons Upload dependency.
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
I wrote a 'patch' for the showcase once to have these things visible in there. Not sure where it ended up, might be that I never submitted it. Or at least a reference to the documentation would be of great help
– Kukeltje
Jan 4 at 14:57
Thanks for you response. That did not fix my problem though.
– Dreana
Jan 4 at 17:44
add a comment |
Two common things people forget from the users guide. Don't forget "Faces Servlet" has to match your Servlet name of your Faces Servlet in web.xml
In your web.xml
<!-- Primefaces required for FileUploads to work -->
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
In your pom.xml add Commons Upload dependency.
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
I wrote a 'patch' for the showcase once to have these things visible in there. Not sure where it ended up, might be that I never submitted it. Or at least a reference to the documentation would be of great help
– Kukeltje
Jan 4 at 14:57
Thanks for you response. That did not fix my problem though.
– Dreana
Jan 4 at 17:44
add a comment |
Two common things people forget from the users guide. Don't forget "Faces Servlet" has to match your Servlet name of your Faces Servlet in web.xml
In your web.xml
<!-- Primefaces required for FileUploads to work -->
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
In your pom.xml add Commons Upload dependency.
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
Two common things people forget from the users guide. Don't forget "Faces Servlet" has to match your Servlet name of your Faces Servlet in web.xml
In your web.xml
<!-- Primefaces required for FileUploads to work -->
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
In your pom.xml add Commons Upload dependency.
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
answered Jan 4 at 12:20
MellowareMelloware
3,53012138
3,53012138
I wrote a 'patch' for the showcase once to have these things visible in there. Not sure where it ended up, might be that I never submitted it. Or at least a reference to the documentation would be of great help
– Kukeltje
Jan 4 at 14:57
Thanks for you response. That did not fix my problem though.
– Dreana
Jan 4 at 17:44
add a comment |
I wrote a 'patch' for the showcase once to have these things visible in there. Not sure where it ended up, might be that I never submitted it. Or at least a reference to the documentation would be of great help
– Kukeltje
Jan 4 at 14:57
Thanks for you response. That did not fix my problem though.
– Dreana
Jan 4 at 17:44
I wrote a 'patch' for the showcase once to have these things visible in there. Not sure where it ended up, might be that I never submitted it. Or at least a reference to the documentation would be of great help
– Kukeltje
Jan 4 at 14:57
I wrote a 'patch' for the showcase once to have these things visible in there. Not sure where it ended up, might be that I never submitted it. Or at least a reference to the documentation would be of great help
– Kukeltje
Jan 4 at 14:57
Thanks for you response. That did not fix my problem though.
– Dreana
Jan 4 at 17:44
Thanks for you response. That did not fix my problem though.
– Dreana
Jan 4 at 17:44
add a comment |
Ok, so what solved my problem in the end was to add these methods in my Servlet Configurations, and now the Upload works just fine:
@Bean
public ServletRegistrationBean facesServletRegistratiton() {
ServletRegistrationBean registration = new ServletRegistrationBean(new FacesServlet(), new String { "*.xhtml" });
registration.setName("Faces Servlet");
registration.setLoadOnStartup(1);
return registration;
}
@Bean
public FilterRegistrationBean facesUploadFilterRegistration() {
FilterRegistrationBean registrationBean = new FilterRegistrationBean(new FileUploadFilter(), facesServletRegistratiton());
registrationBean.setName("PrimeFaces FileUpload Filter");
registrationBean.addUrlPatterns("/*");
registrationBean.setDispatcherTypes(DispatcherType.FORWARD, DispatcherType.REQUEST);
return registrationBean;
}
@Bean
public ServletContextInitializer servletContextInitializer() {
return new ServletContextInitializer() {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
servletContext.setInitParameter("primefaces.UPLOADER", "commons");
}
};
}
add a comment |
Ok, so what solved my problem in the end was to add these methods in my Servlet Configurations, and now the Upload works just fine:
@Bean
public ServletRegistrationBean facesServletRegistratiton() {
ServletRegistrationBean registration = new ServletRegistrationBean(new FacesServlet(), new String { "*.xhtml" });
registration.setName("Faces Servlet");
registration.setLoadOnStartup(1);
return registration;
}
@Bean
public FilterRegistrationBean facesUploadFilterRegistration() {
FilterRegistrationBean registrationBean = new FilterRegistrationBean(new FileUploadFilter(), facesServletRegistratiton());
registrationBean.setName("PrimeFaces FileUpload Filter");
registrationBean.addUrlPatterns("/*");
registrationBean.setDispatcherTypes(DispatcherType.FORWARD, DispatcherType.REQUEST);
return registrationBean;
}
@Bean
public ServletContextInitializer servletContextInitializer() {
return new ServletContextInitializer() {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
servletContext.setInitParameter("primefaces.UPLOADER", "commons");
}
};
}
add a comment |
Ok, so what solved my problem in the end was to add these methods in my Servlet Configurations, and now the Upload works just fine:
@Bean
public ServletRegistrationBean facesServletRegistratiton() {
ServletRegistrationBean registration = new ServletRegistrationBean(new FacesServlet(), new String { "*.xhtml" });
registration.setName("Faces Servlet");
registration.setLoadOnStartup(1);
return registration;
}
@Bean
public FilterRegistrationBean facesUploadFilterRegistration() {
FilterRegistrationBean registrationBean = new FilterRegistrationBean(new FileUploadFilter(), facesServletRegistratiton());
registrationBean.setName("PrimeFaces FileUpload Filter");
registrationBean.addUrlPatterns("/*");
registrationBean.setDispatcherTypes(DispatcherType.FORWARD, DispatcherType.REQUEST);
return registrationBean;
}
@Bean
public ServletContextInitializer servletContextInitializer() {
return new ServletContextInitializer() {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
servletContext.setInitParameter("primefaces.UPLOADER", "commons");
}
};
}
Ok, so what solved my problem in the end was to add these methods in my Servlet Configurations, and now the Upload works just fine:
@Bean
public ServletRegistrationBean facesServletRegistratiton() {
ServletRegistrationBean registration = new ServletRegistrationBean(new FacesServlet(), new String { "*.xhtml" });
registration.setName("Faces Servlet");
registration.setLoadOnStartup(1);
return registration;
}
@Bean
public FilterRegistrationBean facesUploadFilterRegistration() {
FilterRegistrationBean registrationBean = new FilterRegistrationBean(new FileUploadFilter(), facesServletRegistratiton());
registrationBean.setName("PrimeFaces FileUpload Filter");
registrationBean.addUrlPatterns("/*");
registrationBean.setDispatcherTypes(DispatcherType.FORWARD, DispatcherType.REQUEST);
return registrationBean;
}
@Bean
public ServletContextInitializer servletContextInitializer() {
return new ServletContextInitializer() {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
servletContext.setInitParameter("primefaces.UPLOADER", "commons");
}
};
}
answered Jan 25 at 10:28
DreanaDreana
175
175
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54038314%2fpfileupload-method-is-not-called-in-spring-bean%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Does it work if you make it a jsf or cdi managed bean? And remove which ajax=false?
– Kukeltje
Jan 4 at 19:53
I tried to make it a [at]ManagedBean [at]ViewScoped, but that didn't do anything. When I remove the ajax="false" in p:commandButton, it enters the bean method but throws a Nullpointer Exception where file is mentioned first, so i suppose the is no file
– Dreana
Jan 6 at 10:54
@ManagedBean
is not a CDI managed bean, that is@Named
(with the corresponding scopes, pay attention to those), Theajax="false"
on the commandButton is needed in this case, the one on the upload can be removed. And if you run in jsf development mode, any errors?– Kukeltje
Jan 6 at 10:57