[
http://jira.jboss.com/jira/browse/JBSEAM-947?page=comments#action_12357158 ]
Chunyun Zhao commented on JBSEAM-947:
-------------------------------------
Just want to add something I just found out. (I am using Seam 1.2.0 patch1. )
I added a TestFilter to find out what happened to the http request:
@Startup
@Scope(ScopeType.APPLICATION)
@Name("test.testFilter")
@Install(precedence = Install.APPLICATION)
@Intercept(InterceptionType.NEVER)
public class TestFilter extends AbstractFilter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request;
debug(httpRequest.getContentType());
Enumeration parameterNames = httpRequest.getParameterNames();
String name;
while (parameterNames.hasMoreElements()) {
name = (String)parameterNames.nextElement();
debug("Name: " + name + ", Value: " +
httpRequest.getParameter(name));
}
chain.doFilter(request, response);
}
private void debug(String message) {
System.out.println("==== DEBUGING ==== " + message);
}
}
The testFilter is initialized by SeamFilter properly:
11:20:11,373 INFO [SeamFilter] Initializing filter:
org.jboss.seam.servlet.multipartFilter
11:20:11,373 INFO [SeamFilter] Initializing filter:
org.jboss.seam.servlet.exceptionFilter
11:20:11,373 INFO [SeamFilter] Initializing filter: com.vec.filter.testFilter
11:20:11,373 INFO [SeamFilter] Initializing filter:
org.jboss.seam.servlet.redirectFilter
But I don't see any system outs in my JBoss console when I send the request. That
leads me to believe that somehow the SeamFilter is not being invoked in JBoss Portal
environment, seems like a JBoss Portal issue?
Problem with seam component <s:fileUpload/> in JBoss Portal
-----------------------------------------------------------
Key: JBSEAM-947
URL:
http://jira.jboss.com/jira/browse/JBSEAM-947
Project: JBoss Seam
Issue Type: Bug
Components: JSF
Affects Versions: 1.1.5.GA, 1.1.6.GA
Environment: Windows XP Pro service pack 2, I.E. and FireFox, JBossAS 4.0.5.GA,
JBoss Portal 2.4.1
Reporter: Pietro Passantini
Assigned To: Shane Bryzak
I need to upload a file to Jackrabbit Repository using Seam Framework running on Portlet,
with the <s:fileUpload/> component.
It doesn't work.
I've tried different ways to solve the problem, but none worked.
It could be a bug.
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.
I'm trying with this 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>
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira