首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

tomcat6 jndi 1

2012-10-11 
tomcat6 jndi 一1.%tomcat_home%/conf/context.xml下增加:Resource namedbUserInfoauthContainerty

tomcat6 jndi 一
1.%tomcat_home%/conf/context.xml下增加:
    <Resource name="dbUserInfo"
        auth="Container"
        type="com.huawei.support.dao.Decryption.DBUserInfo"
        factory="com.huawei.support.dao.DBUserInfoFactory"
        userName="t19078"
        password="94-DD-D0-B2-E6-E4-91-F9-BD-B0-89-4D-C4-54-80-37" />
其中密码用了DES加密

2.web工程的web.xml中:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.properties</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>

    <resource-ref>
        <res-ref-name>dbUserInfo</res-ref-name>
        <res-type>com.huawei.support.dao.DBUserInfo</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
        </servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/ws/*</url-pattern>
</servlet-mapping>
</web-app>

热点排行