使用netbeans 搭建 JSF+SPRING 框架
spring版本使用4,jsf版本2.2
jsf的配置文件faces-config.xml
复制代码代码如下:
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.0"
              xmlns="<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a>" 
              xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" 
              xsi:schemaLocation="<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a> <a href="http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd</a>">
    <application>
        <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
    </application>
</faces-config>
spring配置文件spring-config.xml
复制代码代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="<a href="http://www.springframework.org/schema/beans">http://www.springframework.org/schema/beans</a>"
       xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"
       xmlns:aop="<a href="http://www.springframework.org/schema/aop">http://www.springframework.org/schema/aop</a>"
       xmlns:c="<a href="http://www.springframework.org/schema/c">http://www.springframework.org/schema/c</a>"
       xmlns:context="<a href="http://www.springframework.org/schema/context">http://www.springframework.org/schema/context</a>"
       xmlns:flow="<a href="http://www.springframework.org/schema/webflow-config">http://www.springframework.org/schema/webflow-config</a>"
       xmlns:jee="<a href="http://www.springframework.org/schema/jee">http://www.springframework.org/schema/jee</a>"
       xmlns:jms="<a href="http://www.springframework.org/schema/jms">http://www.springframework.org/schema/jms</a>"
       xmlns:lang="<a href="http://www.springframework.org/schema/lang">http://www.springframework.org/schema/lang</a>"
       xmlns:osgi="<a href="http://www.springframework.org/schema/osgi">http://www.springframework.org/schema/osgi</a>"
       xmlns:p="<a href="http://www.springframework.org/schema/p">http://www.springframework.org/schema/p</a>"
       xmlns:tx="<a href="http://www.springframework.org/schema/tx">http://www.springframework.org/schema/tx</a>"
       xmlns:util="<a href="http://www.springframework.org/schema/util">http://www.springframework.org/schema/util</a>"
       xmlns:jpa="<a href="http://www.springframework.org/schema/data/jpa">http://www.springframework.org/schema/data/jpa</a>"
 
       xsi:schemaLocation="<a href="http://www.springframework.org/schema/beans">http://www.springframework.org/schema/beans</a> <a href="http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">http://www.springframework.org/schema/beans/spring-beans-4.0.xsd</a>            
新闻热点
疑难解答
图片精选