I am trying to implement multi file upload using primefaces5.2 in IE11 browser, but its not allowing me to select more than one file at once.
The same stuff is working perfectly in chrome browser.
Jars Configured:
javax.faces.jar(JSF2.1.9),Primefaces5.2.jar ,Weblogic 12c
Web.xml :
<web-app>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>primefaces.UPLOADER</param-name>
<param-value>auto</param-value>
</context-param>
<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>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
fileUpload.xhtml :
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<h:form enctype="multipart/form-data" >
<p:fileUpload value="#{fileUploadBean.file}" mode="advanced" multiple="true"
fileUploadListener="#{fileUploadBean.fileUploadListener}"></p:fileUpload>
</h:form>
<h:body>
</html>
FileUploadBean.java
@ManagedBean
@SessionScoped
public class FileUploadBean {
UploadedFile file;
public UploadedFile getFile() {
return file;
}
public void setFile(UploadedFile file) {
this.file = file;
}
public void fileUploadListener(FileUploadEvent e){
// Get uploaded file from the FileUploadEvent
this.file = e.getFile();
// Print out the information of the file
System.out.println("Uploaded File Name Is :: "+file.getFileName() +" :: Uploaded File Size :: "+file.getSize());
}
In IE 11 my web application is in compatibility mode, I removed web application from compatibility mode and now I am able to select multiple files.