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

配置Web.xml使这个Servlet在启动时加载。<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

<servlet>

<servlet-name>testConnectionPooler</servlet-name>

<servlet-class>com.test.web.TestServlet</servlet-class>

<load-on-startup>2</load-on-startup>

</servlet>

启动Tomcat

<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"></path><lock v:ext="edit" aspectratio="t"></lock></shapetype><shape id="_x0000_i1025" style="WIDTH: 129.75pt; HEIGHT: 85.5pt" type="#_x0000_t75"><img src="http://dev.csdn.net/Develop/ArticleImages/25/25884/CSDN_Dev_Image_2004-3-211047340.png" o=""></shape>

出现信息如下

2004-3-20 <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><time hour="21" minute="28"><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">21:28:05</span></time> org.apache.commons.modeler.Registry getRegistry

信息: Creating new Registry instance

2004-3-20 <time hour="21" minute="28"><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">21:28:06</span></time> org.apache.commons.modeler.Registry getServer

信息: Creating MBeanServer

2004-3-20 <time hour="21" minute="28"><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">21:28:07</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 21:28:11,843 INFO [main] web.TestServlet (TestServlet.java:43) - 连接池OK

2004-3-20 <time hour="21" minute="28"><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">21:28:13</span></time> org.apache.struts.util.PropertyMessageResources <init>

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

2004-3-20 <time hour="21" minute="28"><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">21:28:13</span></time> org.apache.struts.util.PropertyMessageResources <init>

现在我们关闭MySQL数据库服务,再重新启动Tomcat

出现信息如下

2004-3-20 <time hour="21" minute="26"><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">21:26:48</span></time> org.apache.commons.modeler.Registry getRegistry

信息: Creating new Registry instance

2004-3-20 <time hour="21" minute="26"><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">21:26:49</span></time> org.apache.commons.modeler.Registry getServer

信息: Creating MBeanServer

2004-3-20 <time hour="21" minute="26"><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">21:26:50</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 21:26:55,421 ERROR [main] web.TestServlet (TestServlet.java:48) - 出现错误Cannot create PoolableConnectionFactory

2004-3-20 <time hour="21" minute="26"><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">21:26:56</span></time> org.apache.struts.util.PropertyMessageResources <init>

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

2004-3-20 <time hour="21" minute="26"><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">21:26:56</span></time> org.apache.struts.util.PropertyMessageResources <init>

好了数据库连接已经成功,接下来我们重新配置Hibernate,使其支持连接池

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值