-
1. Re: File upload issue
mpickell Jul 20, 2010 6:23 PM (in response to mpickell)additional information:
If I change "allowFlash" to "true", i get a different error:
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at org.richfaces.renderkit.FileUploadRendererBase.doDecode(FileUploadRendererBase.java:140)-- If I am setting this component up in java, using the HtmlFileUpload class, is there a minimum set of attributes that I MUST set? for example, do I need to set a value, even though the FileUploadListener is handling every upload?
-
2. Re: File upload issue
nbelaevski Jul 21, 2010 4:08 AM (in response to mpickell)Hi Matthew,
Please check that MyFaces filter is configured correctly - it should be called after RF filter, not before. Also you should see warning message if configuration is not correct.
-
3. Re: File upload issue
mpickell Jul 21, 2010 7:41 AM (in response to nbelaevski)Here is that section of my web.xml:
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter><filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping><filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>
org.apache.myfaces.webapp.filter.ExtensionsFilter
</filter-class>
<init-param>
<description>
Set the size limit for uploaded files. Format: 10 - 10
bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
</description>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<description>
Set the threshold size - files below this limit are
stored in memory, files above this limit are stored on
disk. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g -
1 GB
</description>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.faces</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping> -
4. Re: File upload issue
ilya_shaikovsky Jul 21, 2010 7:57 AM (in response to mpickell)filters which are uses url-mapping - called before filters which are uses servlet-mapping by name and no matter in which sequence them defined in web.xml
-
5. Re: File upload issue
mpickell Jul 21, 2010 8:37 AM (in response to ilya_shaikovsky)Ilya,
So what you are saying is that these filters are being called in the wrong order? Can I define richfaces to be called after myfaces?
-
6. Re: File upload issue
ilya_shaikovsky Jul 21, 2010 8:48 AM (in response to mpickell)As Nick said:
Please check that MyFaces filter is configured correctly - it should be called after RF filter, not before.
RF should be first.
And in your case - according to my explanation - MyFaces ones are.
-
7. Re: File upload issue
mpickell Jul 21, 2010 9:43 AM (in response to ilya_shaikovsky)ok, so i need the myfaces filter to run after the RF filter, but the myfaces use URL-mapping so it is running before the RF filter.
Can you suggest a change or is this something that requires a more major reconfiguration?
-
8. Re: File upload issue
mpickell Jul 21, 2010 3:48 PM (in response to mpickell)Would this issue affect all of RichFaces, or only this specific issue? Because everything else is working fine except for this file upload.
Thanks.
-
9. Re: File upload issue
ilya_shaikovsky Jul 22, 2010 6:01 AM (in response to mpickell)this could affect the other part of app only inone way - another issues will not be appear.. Because fileUpload not the only component which potentially(in specific cases) could be broken in such cnfiguration.
Here is issue which was risen to create sample: https://jira.jboss.org/browse/RF-3096