Upload Files with JSF and MyFaces
Subject:   problems
Date:   2007-02-26 07:51:40
From:   AlexDafinei
I have problems with the upload. Basically I am doing the same things in the example:
-import libraries (same versions and libraries of the article),
-set up extension filter in the web.xml file
-doing a backing bean with field myFile and some other String fields.
-working with netbeans 5.0 and tomcat 5.5.9
The problem is:
If I don't write enctype="multipart/form-data" in the jsp (jsf)page getMyFile returns null, but all the other values in the form fields are ok and it goes through the action bound method(as expected).
If I write enctype="multipart/form-data" in the jsp page when I click the submit button it doesn't even go to the action bound method and stays on the same jsp page. It seems that the extension filter does not filter anything!!
Did someone have the same problems?? Am I doing something wrong?
Main Topics Oldest First

Showing messages 1 through 2 of 2.

  • problems
    2007-09-14 09:17:47  JRJ [View]

    I had the same problem, and it turned out the issue was that I hadn't updated my web.xml with the context-parm STATE_SAVING_METHOD and the ExtensionsFilter.
  • problems
    2007-03-09 11:49:42  Amou [View]

    Hey Alex,

    Were you able to solve this problem ? I'm having exactly the same issue and try just about any other file upload. Once I change the encoding to multipart, that's it can't go further.....
    Please any help is appreciated