体会真正的Struts开发(2期)6

启动Tomcat,显示如下:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

信息: Creating new Registry instance

2004-3-20 <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><time hour="22" minute="58"><span lang="EN" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: red; FONT-FAMILY: 宋体; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体; mso-highlight: white">22:58:04</span></time> org.apache.commons.modeler.Registry getServer

信息: Creating MBeanServer

2004-3-20 <time hour="22" minute="58"><span lang="EN" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: red; FONT-FAMILY: 宋体; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体; mso-highlight: white">22:58:05</span></time> org.apache.coyote.http11.Http11Protocol init

信息: Initializing Coyote HTTP/1.1 on port 80

Starting service Tomcat-Standalone

Apache Tomcat/4.1.27-LE-jdk14

2004-03-20 22:58:11,734 INFO [main] web.TestHBMServlet (TestHBMServlet.java:58) - Open Session OK

2004-03-20 22:58:11,890 INFO [main] web.TestHBMServlet (TestHBMServlet.java:77) - 140

2004-3-20 <time hour="22" minute="58"><span lang="EN" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: red; FONT-FAMILY: 宋体; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体; mso-highlight: white">22:58:13</span></time> org.apache.struts.util.PropertyMessageResources <init>

信息: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true

2004-3-20 <time hour="22" minute="58"><span lang="EN" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: red; FONT-FAMILY: 宋体; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt; mso-bidi-font-family: 宋体; mso-highlight: white">22:58:13</span></time> org.apache.struts.util.PropertyMessageResources <init>

这样 Hibernate配置利用Tomcat的连接池成功。

注意点:

l 不能利用cfg = new Configuration().configure("/hibernate.cfg.xml");创建Configure以后再利用cfg.addClass()这样配置以后只能利用配置文件中的<mapping resource=“”/>

l 因为已经利用了hibernate.properties所以在编写其他时候一定要用cfg = new Configuration().configure("/hibernate.cfg.xml")来配置Configure

l 删除文件hibernate.properties

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值