Richfaces 3.3コントロールa 4 j:outputMediaとFirefox 11の互換性の問題を処理します.

14685 ワード

Hey Guys、
I have found some problem with richfaces 3.3 and firefox 11.It seems that the javascript has changed in firefox.
 
When I use a 4 j:outputMedia and rerender I got the followwing error:
ERROR[org.apphe.apple.com re.containerBase.[jboss.web].[local host].[/BPM-Parocess].[default]]Servvice().for servlet default default threw exception:java.facess.Edededefacent.Excent
at org.ajax 4 jsf.resource.Resource Buldelmpl.decrypt(Resource BuldelImpl.java:627)[:3.3.3.3.Final]
at org.ajax 4 jsf.resource.Resource Burdelmpl.get Resource Data ForKey(Resource Bull.java:371)[:3.3.3.Final]
at org.ajax 4 jsf.resource.Internet Resource.serviceResource(InternetResource.java:156)[:3.3.3.Final]
at org.ajax 4 jsf.resource.Internet Resource.serviceResource(InternetResource.java:141)[:3.3.3.Final]
at org.ajax 4 jsf.webapp.BaseFilter.dofilter(BaseFilter.java:508)[:3.3.3.3.Final]
at org.jboss.seam.web.Ajax 4 jsf Filter.dofilter(Ajax 4 jsfFilter.java:56)[:2.2.2 Final]
at org.jboss.seam.servlet.Seam Filter$Filter ChinImpl.dofilter(Seam Filter.java:69)[:2.2.2.2 Final]
at org.jboss.seam.web.ロギングFilter.dofilter(ロギングFilter.java:60)[:2.2.2.2 Final]
at org.jboss.seam.servlet.Seam Filter$Filter ChinImpl.dofilter(Seam Filter.java:69)[:2.2.2.2 Final]
at org.jboss.seam.servlet.Seam Filter$Filter ChinImpl.dofilter(Seam Filter.java:73)[:2.2.2.2.Final]
at org.jboss.seam.servlet.Seam Filter.dofilter(Seam Filter.java:158)[:2.2.2.2 Final]
at org.apacthe.cantalina.co re.Appliation Filter.internal DFilter(Appplication Filter Chara.java:274)[:6.1.0.Final]
at org.apacthe.cantalina.co.re.Appliation FilterChane.dofilter(Appplication Filter Chare.java:242)[:6.1.0.Final]
at org.apache.cantalina.co re.StandardWrapperValve.invoke(StanddardWrapperValve.java:275)[:6.1.0.Final]
at org.apacthe.aparaina.com re.Standard ControtextValve.invoke(Standard ContactextValve.java:161)[:6.1.0.Final]
at org.jboss.web.tomcat.security.Security Asociation Valve.invoke(Security Asociation Valve.java:181)[:6.1.0.Final]
at org.apacthe.authenticator.Authenticators.invoke(Authenticators.java:501)[:6.1.0.Final]
at org.jboss.modcluster.catalina.ranaContext$Request ListenerValve.event(Catalina Contact.java:285)[:1.1.0.Final]
at org.jboss.modcluster.catalina.ranaContext$Request ListenerValve.invoke(Catalina Contact.java:261)[:1.1.0.Final]
at org.jboss.web.tomcat.security.JacConttextValve.invoke(JacContactextValve.java:88)[:6.1.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishment Valve.invoke(SecurityContEstablishment Valve.java:100)[:6.1.0.Final]
at org.apache.aparaina.co.Standard HostValve.invoke(Standard HostValve.java:159)[:6.1.0.Final]
at org.apache.aparaina.valves.Error Report Valve.invoke(Error Report Valve.java:102)[:6.1.0.Final]
at org.jboss.web.tomcat.service.jca.achedConnection Valve.invoke(CachecdConnection Valve.java:158)[:6.1.0.Final]
at org.apache.cantalina.com re.Standard Enginese Valve.invoke(Standard EntineValve.java:109)[:6.1.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequest ResonseCacheValve.invoke(Active Request ResponseCacheValva.java:53)[:6.1.0.Final]
at org.apache.cantalina.co.co ector.oyoteAdapter.service(CoyoteAdapter.java:362)[:6.1.0.Final]
at org.apache.co yote.http 11 Process.process(Http 11 Process.java:877)[:6.1.0.Final]
atog.apache.co yote.http 11 Protocol$Http 11 Connection Handler.process(Http11 Protocol.java:654)[:6.1.0.Final]
at org.appache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEnd point.java:951)[:6.1.0.Final]
at java.lang.Thread.run(Uniknown Source)[:1.6.0_31]
Caused by:java.util.zip.Data FormatException:invalid bit length repeat
at java.util.zip.Inflater.inflate Bytes(Native Method)[:1.6.0_31]
at java.util.zip.Inflater.inflate(Uniknown Source)[:1.6.0_31]
at java.util.zip.Inflater.inflate(Uniknown Source)[:1.6.0_31]
at org.ajax 4 jsf.resource.Resource Buldelmpl.decrypt(Resource BuldelImpl.java:621)[:3.3.3.3.Final]
…30 more
The Image does not get paint,but if i press f 5,it works fine.
 
Also this error appars with rich:picklist:
10:34:38,856 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/BPM-Process].[default]] Servlet.service() for servlet default threw exception: javax.faces.FacesException: Error decode resource data at org.ajax4jsf.resource.ResourceBuilderImpl.decrypt(ResourceBuilderImpl.java:627) [:3.3.3.Final] at org.ajax4jsf.resource.ResourceBuilderImpl.getResourceDataForKey(ResourceBuilderImpl.java:371) [:3.3.3.Final] at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:156) [:3.3.3.Final] at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141) [:3.3.3.Final] at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508) [:3.3.3.Final] at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) [:2.2.2.Final] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.2.Final] at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [:2.2.2.Final] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [:2.2.2.Final] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73) [:2.2.2.Final] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [:2.2.2.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.1.0.Final] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [:6.1.0.Final] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.1.0.Final] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [:6.1.0.Final] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.1.0.Final] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.1.0.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159) [:6.1.0.Final] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.1.0.Final] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.1.0.Final] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.1.0.Final] at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.1.0.Final] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.1.0.Final] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.1.0.Final] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.1.0.Final] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.1.0.Final] at java.lang.Thread.run(Unknown Source) [:1.6.0_31] Caused by: java.util.zip.DataFormatException: incorrect data check at java.util.zip.Inflater.inflateBytes(Native Method) [:1.6.0_31] at java.util.zip.Inflater.inflate(Unknown Source) [:1.6.0_31] at java.util.zip.Inflater.inflate(Unknown Source) [:1.6.0_31] at org.ajax4jsf.resource.ResourceBuilderImpl.decrypt(ResourceBuilderImpl.java:621) [:3.3.3.Final] ... 30 more 
------------------
    :
         ,   Firefox    .
    :
1.       :
package com.singtel.tool;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

public class RichFacesFirefox11Filter implements Filter {

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
chain.doFilter(new HttpServletRequestWrapper((HttpServletRequest) request) {
@Override
public String getRequestURI() {
try {
return URLDecoder.decode(super.getRequestURI(), "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new IllegalStateException("Cannot decode request URI.", e);
}
}
}, response);
}

@Override
public void init(FilterConfig filterConfig) throws ServletException {
// do nothing
}

@Override
public void destroy() {
// do nothing
}

}
2.web.xml    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, firefox11 -->
<filter>
<filter-name>RichFacesFirefox11Filter</filter-name>
<filter-class>com.singtel.tool.RichFacesFirefox11Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>RichFacesFirefox11Filter</filter-name>
<url-pattern>/a4j/*</url-pattern>
</filter-mapping>