---
title: "体会真正的Struts开发(2期)6"
author: "fanjava"
date: "2004-06-27T19:02:00Z"
tags: []
slug: "struts-2-6"
draft: false
lastmod: "2004-06-27T19:02:00Z"
id: 601989
url: "https://fanjava.iteye.com/blog/601989"
---

启动Tomcat，显示如下:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;

信息: Creating new Registry instance

2004-3-20 &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;time hour="22" minute="58"&gt;&lt;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"&gt;22:58:04&lt;/span&gt;&lt;/time&gt; org.apache.commons.modeler.Registry getServer

信息: Creating MBeanServer

2004-3-20 &lt;time hour="22" minute="58"&gt;&lt;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"&gt;22:58:05&lt;/span&gt;&lt;/time&gt; 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 &lt;time hour="22" minute="58"&gt;&lt;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"&gt;22:58:13&lt;/span&gt;&lt;/time&gt; org.apache.struts.util.PropertyMessageResources &lt;init&gt;

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

2004-3-20 &lt;time hour="22" minute="58"&gt;&lt;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"&gt;22:58:13&lt;/span&gt;&lt;/time&gt; org.apache.struts.util.PropertyMessageResources &lt;init&gt;

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

**注意点：**

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

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

l 删除文件hibernate.properties