JSF: 1.2
Server: Weblogic
I am trying to implement multiple file upload. As I need to give support for IE7 so I cannot use
Here,
for (FileItem item : items) {
if (!item.isFormField()) {
files.add(item);
}
}
you're ignoring all form fields, such as the button itself. When continuing such a request, JSF will have no clue that a button was been invoked and thus not queue any action at all.
You need to add an else
to collect all form fields in a Map
and wrap the request with a HttpServletRequestWrapper
which delegates to that map on all getParameterXxx()
calls and finally continue the filter chain with the wrapped request. This way JSF will find out that the button was invoked and then queue to the proper action.