RichFaces在FireFox下Error decode resource data异常的解决方法

阅读更多
当WEB应用使用RichFaces出现如下异常:
javax.faces.FacesException: Error decode resource data
时,
该问题是由于RichFaces在FireFox中 "!" encoded as "%21",解码时出错了,在其它浏览器正常
官方解释:Tracing into ResourceBuilderImpl.decrypt shows that FF11 gives us strings where the exclamation point "!" is encoded as "%21". IOW there is a call to URLDecoder.decode missing somewhere
可以通过更新
richfaces-impl-3.3.1.GA.jar 下面的WebXml.class来解决。
增加代码如下:
String s = getFacesResourceKey(resourcePath);
    if (null != s)
      try {
        return URLDecoder.decode(s, "ISO-8859-1");
      }
      catch (UnsupportedEncodingException e)
      {
      }
    return null;

解决方案出处:https://issues.jboss.org/browse/RF-12062

你可能感兴趣的:(richfaces,firefox,Error,decode,resource)