首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

怎么将XML校验改成本地校验

2012-03-26 
如何将XML校验改成本地校验我在structs+spring+hibernate的整合当中我将applicationContext.xml这配置文件

如何将XML校验改成本地校验
我在structs+spring+hibernate的   整合当中
我将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>

        <bean   id= "dataSource "   class= "org.springframework.jdbc.datasource.DriverManagerDataSource ">
                <property   name= "driverClassName "> <value> com.mysql.jdbc.Driver </value> </property>
                <property   name= "url "> <value> jdbc:mysql://localhost:3306/itadb </value> </property>
                <property   name= "username "> <value> root </value> </property>
                <!--   Make   sure   <value>   tags   are   on   same   line   -   if   they 're   not,  
                          authentication   will   fail   -->
                <property   name= "password "> <value> 123456 </value> </property>
        </bean>

--------------------------------
改成:
<?xml   version= "1.0 "   encoding= "UTF-8 "?>
<!DOCTYPE   beans   PUBLIC   "-//SPRING//DTD   BEAN//EN "
        "http://www.springframework.org/dtd/spring-beans.dtd ">

<beans>

        <bean   id= "dataSource "   class= "org.springframework.jdbc.datasource.DriverManagerDataSource ">
                <property   name= "driverClassName "   value= "com.mysql.jdbc.Driver "/>
                <property   name= "url "   value= "jdbc:mysql://localhost:3306/itadb "/>
                <property   name= "username "   value= "root "/>
                <!--   Make   sure   <value>   tags   are   on   same   line   -   if   they 're   not,  
                          authentication   will   fail   -->
                <property   name= "password "   value= "123456 "/>
               
        </bean>

--------------------------------------
如果把网络断开,就无法读取这个XML文件,必须要将网络   打开
请问如何将网络校验改成本地校验

请   帮帮忙


[解决办法]
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN "
"http://localhost/dtd/spring-beans.dtd ">



并且把他的dtd下载并部署到你本地
[解决办法]
www203(水户洋平) ( ) 信誉:102 2007-07-27 12:35:41 得分: 0


<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN "
"http://localhost/dtd/spring-beans.dtd ">

并且把他的dtd下载并部署到你本地


按这位朋友的办法做怎么会不行~???
把这句
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN "
"http://localhost/dtd/spring-beans.dtd ">
中的路径改成本地的~

热点排行