1. upgrade all the jar
remove facelet.jar, jsf.jar, myface.jar, richfaces.jar, oro.jar, tomahawk.jar
use
myfaces-bundle-2.1.1.jar
xml-apis-1.0.b2.jar
xmlParserAPIs-2.0.2.jar
tomahawk20-1.1.11.jar
oro-2.0.8.jar
richfaces-components-api-4.0.0.Final.jar
richfaces-components-ui-4.0.0.Final.jar
richfaces-core-api-4.0.0.Final.jar
richfaces-core-impl-4.0.0.Final.jar
(richfaces dependency)
batik-awt-util-1.6-1.jar
batik-ext-1.6-1.jar
batik-gui-util-1.6-1.jar
batik-util-1.6-1.jar
cssparser-0.9.5.jar
guava-r09.jar
guava-r09-gwt.jar
2. must add
jstl-impl-1.2jar
jstl-api-1.2.jar
3. in web.xml, replace
xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”>
with
xmlns=”http://java.sun.com/xml/ns/javaee” xmlns:web=”http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd”
xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd”
version=”2.5″>
replace
facelets.DEVELOPMENT true
javax.faces.DEFAULT_SUFFIX.html
with
javax.faces.PROJECT_STAGE Development
javax.faces.FACELETS_VIEW_MAPPINGS*.html
replace
RichFaces Filter
richfaces
org.ajax4jsf.Filter
createTempFiles true
maxRequestSize 10485768
richfaces
Faces Servlet
REQUEST
FORWARD
INCLUDE
with
createTempFiles true
maxRequestSize10485768
5. in navigations.xml,
remove
com.sun.facelets.FaceletViewHandler
replace
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd”
version=”1.2″>
with
6. in beans.xml,
replace
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd”
version=”1.2″>
with
7. to support EL 2.2 (pass param to backing bean via method)
[http://wiki.apache.org/myfaces/HowToEnableEl22]
– backup and delete ${TOMCAT}/lib/el-api.jar
– replace with el-api-2.2.jar & el-impl-2.2.jar
http://download.java.net/maven/2/org/glassfish/web/el-impl/2.2/el-impl-2.2.jar
http://download.java.net/maven/2/javax/el/el-api/2.2/el-api-2.2.jar
add following in web.xml (we uses myfaces for JSF implementation)
org.apache.myfaces.EXPRESSION_FACTORYcom.sun.el.ExpressionFactoryImpl
———————————Following is updating deprecated logic and tag for JSF 2.0———————————-
a. update unsupport tag
ref.
http://community.jboss.org/wiki/RichFacesMigrationGuide33x-4xMigration-ComponentsMigration-A4jComponents
http://community.jboss.org/wiki/RichFacesMigrationGuide33x-4xMigration-ComponentsMigration-RichPanelOutputComponents
…. and more deprecated tag
b. HttpServletResponse.sendRedirect(url) may got NullPointerException, uses .getExternalContext().redirect(url)
c. support annotation for managedBean
d. tomahawk may experience weird issue (Illegal Exception : unnamed parameter), use Viewscope if possible
e. some JSF managed bean contain initial method, and forcely trigger by tag.
this should be replaced by @PostContruct annotation.
or
f. if the JSF managed bean cannot convert into view scope, due to reference other managed bean in other scope(like those dao service).
– add the transient modifier in the property
– modify the dependency injection mechanism
add initialization in property getter (e.g. FacesUtil.getManagerBean(“campaignsCDao”) or )
or
initial in @PostConstruct (e.g. setCamId(FacesUtil.getRequest().getParameter(“camId”)) )
g. “render” property in / is working properly to some tag (e.g. outputText).
workaround: add a panel container wrap the reRender elements
h. “ajaxRender” property may not work properly.
workaround: use “render” property with wrapper.