自分用備忘録
自分の自分による自分のための備忘録
2014年6月23日月曜日
JSF1.1とSpringFrameworkの連携用設定ファイル
JSF1.1とSpringFramework2.5の連携用設定ファイル。
[applicationContext.xml]
<?xml version='1.0' encoding='UTF-8' ?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> <!-- bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" p:location="/WEB-INF/jdbc.properties" /> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}" p:username="${jdbc.username}" p:password="${jdbc.password}" / --> <!-- ADD PERSISTENCE SUPPORT HERE (jpa, hibernate, etc) --> <!-- <util:list id="springBean" value-type="java.lang.Integer"> --> <!-- </util:list> --> <bean id="integer" class="java.lang.Integer"> <constructor-arg value="1000" /> </bean> </beans>
[faces-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> <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver> </application> --> <application> <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver> <!-- <locale-config> --> <!-- <default-locale>en</default-locale> --> <!-- <supported-locale>en</supported-locale> --> <!-- <supported-locale>es</supported-locale> --> <!-- </locale-config> --> <!-- <message-bundle>messages</message-bundle> --> </application> <managed-bean> <managed-bean-name>sessionBean</managed-bean-name> <managed-bean-class>jsf11portlet.jsf11.SessionBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>number</property-name> <property-class>java.lang.Integer</property-class> <value>#{integer}</value> </managed-property> </managed-bean> </faces-config>
0 件のコメント:
コメントを投稿
次の投稿
前の投稿
ホーム
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿