Re: FileUpload problem with PrettyFaces 3.3.3 + RichFaces 3.3.3

Splash Forums PrettyFaces Users FileUpload problem with PrettyFaces 3.3.3 + RichFaces 3.3.3 Re: FileUpload problem with PrettyFaces 3.3.3 + RichFaces 3.3.3

#22230

bhl
Participant

Hello Christian,

Strange, but same problem occurs with this war deployed in JBoss AS 7.1.0. Maybe my filters are crazy :(

I don’t know if it is a WebSphere 6.1 (JEE 1.5) bug, but I have another interesting fact: debugging PrettyFacesWrappedRequest class in WebSphere, when super.getParameterMap() has “javax.faces.ViewState” key with “j_id2” value, ClassCastException occurs.

HttpServletRequestWrapper.getParameterMap() contents:

{javax.faces.ViewState=j_id2, formFile:j_id116=true, _richfaces_upload_uid=[Ljava.lang.String;@bca0bca, formFile=formFile, AJAXREQUEST=[Ljava.lang.String;@dac0dac, formFile:arquivoDecoration:uploadArquivo=[Ljava.lang.String;@ca40ca4, _richfaces_upload_file_indicator=[Ljava.lang.String;@d320d32}

HTML Source:

<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id2" />

Another web.xml attempt:

<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
<init-param>
<param-name>createTempFiles</param-name>
<param-value>false</param-value>
</init-param>

<init-param>
<param-name>maxRequestSize</param-name>
<param-value>2100000</param-value>
</init-param>

<init-param>
<param-name>forceparser</param-name>
<param-value>false</param-value>
</init-param>

<init-param>
<param-name>enable-cache</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>

<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>

<filter>
<filter-name>PrettyFilter</filter-name>
<filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PrettyFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>

Any clues? :o)

Thanks a lot!

Bruno