开发者

problem in using <t:inputFileUpload>

开发者 https://www.devze.com 2023-04-05 06:10 出处:网络
I have followed this 开发者_C百科tutorial from BalusC for FileUpload. but setter isn\'t getting calledThat can have the following causes:

I have followed this 开发者_C百科tutorial from BalusC for FileUpload. but setter isn't getting called


That can have the following causes:

  • The enctype="multipart/form-data" attribute is missing on the <h:form>. This is mandatory in order to be able to send files to the server.

  • The ExtensionsFilter is missing in web.xml or not properly mapped on the servlet name of the FacesServlet. This is mandatory in order to be able to parse the multipart/form-data request.

  • There is another filter in the request-response chain before the ExtensionsFilter which has already parsed the multipart/form-data request beforehand. For example, when you're using RichFaces4, such a filter will be auto-loaded without that you need to declare it in web.xml. Request bodies can be parsed only once, so the ExtensionsFilter would receive an empty request after such another filter.

  • There is another filter in the request-response chain before the ExtensionsFilter which has completely skipped the ExtensionsFilter by for example forwarding or redirecting the request.

0

精彩评论

暂无评论...
验证码 换一张
取 消