Posted on 2010-03-01 18:45
斷點(diǎn) 閱讀(1133)
評(píng)論(1) 編輯 收藏 所屬分類:
WebLogic
1.在web項(xiàng)目WEB-INF/下創(chuàng)建weblogic.xml文件。
weblogic.xml文件內(nèi)容如下:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90">
<context-root>/pcis</context-root>
</weblogic-web-app>
其中:<context-root>/pcis</context-root>中pcis該web項(xiàng)目文件夾名稱;
2.在web項(xiàng)目中找到spring的配置文件applicationContext.xml,并在其中配置數(shù)據(jù)源。
<bean id="myDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>jdbc/pcis</value>
</property>
<property name="jndiEnvironment">
<props>
<prop key="java.naming.provider.url">t3://localhost:7001</prop>
<prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
</props>
</property>
</bean>
3.啟動(dòng)E:\bea\user_projects\domains\base_domain\bin下的startWebLogic.cmd,登錄:http://localhost:7001/console/ 。
(1)在左邊的Domain Structure下base_domain/Services/JDBC/Data Sources下配置數(shù)據(jù)源,如jdbc/pcis。
(2)在左邊的Domain Structure下base_domain/Deployments中配置發(fā)布的工程。
注意:在出現(xiàn)這個(gè)“What do you want to name this deployment?”的地方,填上工程的發(fā)布名,如:pcis
4.在base_domain/Deployments下,選擇要啟動(dòng)的工程,點(diǎn)擊“Start”。
5.工程啟動(dòng)完以后,在IE上輸入 http://localhost:7001/pcis ,驗(yàn)證是否成功登錄。