问题
I'm trying to migrate a web application from richfaces 3.3.2 to 4.0.0 so I changed the necessary stuff in the web.xml file (servlet mapping ".xhtml" and removed Ajax4jsf Filter). I also changed the richfaces 3 jars to the 4th version but now I've got some errors and don't know how to resolve them:
The import org.ajax4jsf cannot be resolved
The import org.ajax4jsf cannot be resolved
The import org.ajax4jsf cannot be resolved
The import org.richfaces cannot be resolved
The import org.richfaces cannot be resolved
The import org.richfaces cannot be resolved
Incompatible conditional operand types UIComponent and UICalendar
UICalendar cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
Incompatible conditional operand types UIViewRoot and AjaxViewRoot
AjaxViewRoot cannot be resolved to a type
AjaxViewRoot cannot be resolved to a type
org.ajax4jsf cannot be resolved to a type
EventsQueue cannot be resolved to a type
HtmlAjaxSupport cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
Incompatible conditional operand types UIComponent and HtmlCalendar
HtmlCalendar cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
HtmlToolTip cannot be resolved to a type
Can anybody help me, please?
回答1:
Missing richfaces-core-impl library
Javadoc AjaxViewRoot v4
回答2:
Remove the RichFaces 3.3 Ajax Filter in web.xml file
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
RichFaces 4.0.0 final open webmvc-config.xml file add this
<bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
<property name="flowExecutor" ref="flowExecutor" />
<property name="ajaxHandler">
<bean class="org.springframework.faces.webflow.JsfAjaxHandler" />
</property>
</bean>
来源:https://stackoverflow.com/questions/12402588/migrating-from-richfaces-3-3-2-to-richfaces-4-0-0-final