疯了 彻底疯了 jsf
最近刚学JSF,用SPRING HIBERNATE JSF集成开发个增删查改的小程序,但是查数据库显示的地方就出错了,现在改成个测试,但是页面空白,日志显示的是:
[2007-07-25 13:30:59,059] [WARN] (VariableResolverImpl.java:348) - Variable 'DotaAcBean ' could not be resolved.
[2007-07-25 13:30:59,059] [WARN] (VariableResolverImpl.java:348) - Variable 'DotaAcBean ' could not be resolved.
现在将代码给大家看看.
WEB.XML
<?xml version= "1.0 " encoding= "UTF-8 "?>
<web-app xmlns= "http://java.sun.com/xml/ns/j2ee " xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance " version= "2.4 " xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">
<session-config>
<session-timeout> 30 </session-timeout>
</session-config>
<listener>
<listener-class> org.apache.myfaces.webapp.StartupServletContextListener </listener-class>
</listener>
<context-param>
<param-name> javax.faces.CONFIG_FILES </param-name>
<param-value> /WEB-INF/faces-config.xml </param-value>
</context-param>
<servlet>
<servlet-name> context </servlet-name>
<servlet-class>
org.springframework.web.context.ContextLoaderServlet
</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<servlet>
<servlet-name> Faces Servlet </servlet-name>
<servlet-class> javax.faces.webapp.FacesServlet </servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name> Faces Servlet </servlet-name>
<url-pattern> *.faces </url-pattern>
</servlet-mapping>
<context-param>
<param-name> contextConfigLocation </param-name>
<param-value> /WEB-INF/applicationContext.xml </param-value>
</context-param>
</web-app>
--------------------------------------
face-config.xml
<?xml version= "1.0 " encoding= "UTF-8 "?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN " "http://java.sun.com/dtd/web-facesconfig_1_1.dtd ">
<faces-config>
<application>
<variable-resolver> org.springframework.web.jsf.DelegatingVariableResolver </variable-resolver>
</application>
<managed-bean>
<managed-bean-name> DotaAcBean </managed-bean-name>
<managed-bean-class> com.dhc.dota.control.DotaAc </managed-bean-class>
<managed-bean-scope> session </managed-bean-scope>
</managed-bean>
</faces-config>
--------------------------------------
applicationContext.xml
<?xml version= "1.0 " encoding= "UTF-8 "?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN " "http://www.springframework.org/dtd/spring-beans.dtd ">
<beans def