I have a JSF 2.0/primefaces web app on Tomcat 7.0.25. The application has a simple file upload form, as in the primefaces showcase.
<h:form enctype="multipart/form-data">
<p:messages showDetail="true" />
<p:fileUpload value="#{fileUploadController.file}" mode="simple" />
<p:commandButton value="Submit" ajax="false" actionListener="#{fileUploadController.upload}" />
</h:form>
public void upload() throws IOException {
FacesMessage msg = new FacesMessage("Succesful", this.file.getFileName() + " is uploaded.");
FacesContext.getCurrentInstance().addMessage(null, msg);
// do stuff with xml
}
I'm trying to make a multipart/form-data POST request to te upload form using a stndalone java client. Sinc now I've tried this and this but without success.
In both cases I receive the HTTP/1.1 200 OK
response and I get the form page, as if the POST was not sent.
Any ideas?