Java <;s:fileUpload>;正在返回空值
使用Java <;s:fileUpload>;正在返回空值,java,seam,seam2,Java,Seam,Seam2,使用执行文件上载时,组件将返回null 应用程序正在使用seam 2.1.2与Richfaces、Jsf集成 <h:panelGrid columns="2" cellspacing="1" cellpadding="0" columnClasses="columnFull"> <s:fileUpload id="picture" data="#{image.uploadedFile}" contentType="#{image.pictureContentTy
执行文件上载时,组件将返回null
应用程序正在使用seam 2.1.2与Richfaces、Jsf集成
<h:panelGrid columns="2" cellspacing="1" cellpadding="0"
columnClasses="columnFull">
<s:fileUpload id="picture" data="#{image.uploadedFile}"
contentType="#{image.pictureContentType}" />
</h:panelGrid>
@Name("image")
@Scope(ScopeType.CONVERSATION)
public class DoImportServiceUpload {
@Lob
@Column(length = 2147483647)
private byte[] uploadedFile;
private String pictureContentType;
@名称(“图像”)
@作用域(ScopeType.CONVERSATION)
公共类DoImportServiceUpload{
@高球
@列(长度=2147483647)
私有字节[]上传文件;
私有字符串pictureContentType;
}
web.xml
<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Seam Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
接缝过滤器
org.jboss.seam.servlet.SeamFilter
接缝过滤器
/*
components.xml
<web:multipart-filter create-temp-files="true"
max-request-size="1000000"
url-pattern="*.seam" />
s:fileUpload
标记是否实际包含在单个h:form
中。h:form
应为
类型。检查在HTML输出中是否也正确呈现了此内容你能发布嵌入
的表单吗?是
还是
?