tomahawk inputfileupload上传的文件为空 [英] tomahawk inputfileupload uploaded file is null

查看:246
本文介绍了tomahawk inputfileupload上传的文件为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Tomahawk的fileupload组件< t:inputfileupload> 来上传文件。我已经将表单的enctype设置为
$ b

I am using Tomahawk's fileupload component <t:inputfileupload> for uploading files. I've set enctype of form as

enctype="multipart/form-data" 

,我用< h:commandButton> 来提交表单。

但是bean中的 UploadedFile 属性是 null 。我在做什么错了,我该如何解决它?

But the UploadedFile property in the bean is null. What am I doing wrong and how can I fix it?

推荐答案

确保已经配置了 ExtensionsFilter 按照文档。它是负责处理 multipart / form-data 请求并将相应的部分设置为bean属性的负责人。

Ensure that you've configured the ExtensionsFilter as per their documentation. It's the one responsible for processing multipart/form-data requests and setting the appropriate parts as bean properties.

  • Uploading files with JSF

这篇关于tomahawk inputfileupload上传的文件为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆