[jboss-user] [JBoss Seam] - Re: s:fileUpload whit portal

ppassantini do-not-reply at jboss.com
Mon Feb 26 04:23:53 EST 2007


Hi shane,
I have just tried, but unfortunately it doesn't work! 
Could you please help me? 
this is my configutaration:

JSP
<h:form id="myForm" enctype="multipart/form-data" >
	<s:fileUpload  accept="" fileName="#{file.filename}" data="#{file.data}" />
	<h:commandButton value="Upload" action="#{fileManager.upload}"/>
</h:form>

BEAN
"file" is the bean that represents the file uploaded 
"fileManager" is the bean that use the file uploaded 

WEB.XML
...

    <filter-name>Seam Filter</filter-name>
    <filter-class>org.jboss.seam.servlet.SeamMultipartFilter</filter-class>

    
<filter-mapping>
   <filter-name>Seam Filter</filter-name>
   <url-pattern>*.seam</url-pattern>
</filter-mapping>
...


It seams that when the enctype of h:form is ="multipart/form-data", the method upload of fileManager is not called; if I don't set the enctype of h:form the method upload is called, but the bean file is null. 

Thanks for you help!




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022299#4022299

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022299



More information about the jboss-user mailing list