I trying out the FileUpload example. However i meet with this problem when i inserted the code to the web.xml
Code: Select all
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
<init-param>
<param-name>uploadDirectory</param-name>
<param-value>/</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
Below is the glassfish error
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: PWC1243: Filter execution threw an exception
root cause
java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory
root cause
java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory
How can i resolve this?
Many thank