2007年5月2日 星期三

[ICEfaces]支援myafecsTomahawk元件

1.myfaces lib
myfaces-core 1.1.5 & tomahawk v1.1.5

2.icefaces lib
ICEfaces-1.6.0-DR4

3.RI implementation會跟myfaces起衝突,把jsf-api.jar和jsf-impl.jar拿出

4.web.xml設定

(1)加入servlet
   servlet
           servlet-name Main Dispatch Servlet servlet-name
          servlet-class com.icesoft.faces.webapp.http.servlet.MainServlet servlet-class
          load-on-startup 1 load-on-startup
   servlet

   servlet-mapping
           servlet-name Main Dispatch Servlet servlet-name
           url-pattern *.iface url-pattern
   servlet-mapping

(2)將FacesServletExtensionsFilter所mapping的去除,
否則會造成myfaces和icefaces之間無法cast的錯誤

(3)加入context-param
context-param
   param-name
          com.icesoft.faces.standardRequestScope
   param-name
   param-value
          true
   param-value
context-param

(4)加入listener
listener
    listener-class
           com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Listener
    listener-class
listener

5.faces-config.xml設定
若有使用facelets,將view-handler改成com.icesoft.faces.facelets.D2DFaceletViewHandler
取代com.sun.facelets.FaceletViewHandler

參考資料:
Status of ICEfaces Support for MyFaces Tomahawk Components

沒有留言: