<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>51PHX</title>
	<atom:link href="http://www.51phx.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.51phx.com</link>
	<description>专注Flex,Air  这里不仅有技术</description>
	<lastBuildDate>Fri, 28 May 2010 14:15:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>初来乍到</title>
		<link>http://www.51phx.com/archives/160</link>
		<comments>http://www.51phx.com/archives/160#comments</comments>
		<pubDate>Fri, 28 May 2010 14:09:23 +0000</pubDate>
		<dc:creator>wangliyun007</dc:creator>
				<category><![CDATA[我们的路]]></category>

		<guid isPermaLink="false">http://www.51phx.com/?p=160</guid>
		<description><![CDATA[我是新手，初来乍到，多多关照哦！
]]></description>
			<content:encoded><![CDATA[<p>我是新手，初来乍到，多多关照哦！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.51phx.com/archives/160/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>世界上最健康的作息时间表</title>
		<link>http://www.51phx.com/archives/139</link>
		<comments>http://www.51phx.com/archives/139#comments</comments>
		<pubDate>Tue, 25 May 2010 16:09:49 +0000</pubDate>
		<dc:creator>Chunk</dc:creator>
				<category><![CDATA[我们的路]]></category>

		<guid isPermaLink="false">http://www.51phx.com/?p=139</guid>
		<description><![CDATA[7:30：起床。英国威斯敏斯特大学的研究人员发现，那些在早上5:22―7:21 分起床的人，其血液中有一种能引起心脏病的物质含量较高，因此，在7:21之后起床对身体健康更加有益。
打开台灯。“一醒来，就将灯打开，这样将会重新调整体内的生物钟，调整睡眠和醒来模式。”拉夫堡大学睡眠研究中心教授吉姆·霍恩说。
喝一杯水。水是身体内成千上万化学反应得以进行的必需物质。早上喝一杯清水，可以补充晚上的缺水状态。
7:30―8:00：在早饭之前刷牙。“在早饭之前刷牙可以防止牙齿的腐蚀，因为刷牙之后，可以在牙齿外面涂上一层含氟的保护层。要么，就等早饭之后半小时再刷牙。”英国牙齿协会健康和安全研究人员戈登·沃特金斯说。
8:00―8:30：吃早饭。“早饭必须吃，因为它可以帮助你维持血糖水平的稳定。”伦敦大学国王学院营养师凯文·威尔伦说。早饭可以吃燕麦粥等，这类食物具有较低的血糖指数。

8:30―9:00：避免运动。来自布鲁奈尔大学的研究人员发现，在早晨进行锻炼的运动员更容易感染疾病，因为免疫系统在这个时间的功能最弱。步行上班。马萨诸塞州大学医学院的研究人员发现，每天走路的人，比那些久坐不运动的人患感冒病的几率低25%。
9:30：开始一天中最困难的工作。纽约睡眠中心的研究人员发现，大部分人在每天醒来的一两个小时内头脑最清醒。
10:30：让眼睛离开屏幕休息一下。如果你使用电脑工作，那么每工作一小时，就让眼睛休息3分钟。
11:00：吃点水果。这是一种解决身体血糖下降的好方法。吃一个橙子或一些红色水果，这样做能同时补充体内的铁含量和维生素C含量。
13:00：在面包上加一些豆类蔬菜。你需要一顿可口的午餐，并且能够缓慢地释放能量。“烘烤的豆类食品富含纤维素，番茄酱可以当作是蔬菜的一部分。”维伦博士说。
14:30―15:30：午休一小会儿。雅典的一所大学研究发现，那些每天中午午休30分钟或更长时间，每周至少午休3次的人，因心脏病死亡的几率会下降37%。
16:00：喝杯酸奶。这样做可以稳定血糖水平。在每天三餐之间喝些酸牛奶，有利于心脏健康。
17:00―19:00：锻炼身体。根据体内的生物钟，这个时间是运动的最佳时间，舍菲尔德大**动学医生瑞沃·尼克说。
19:30：晚餐少吃点。晚饭吃太多，会引起血糖升高，并增加消化系统的负担，影响睡眠。晚饭应该多吃蔬菜，少吃富含卡路里和蛋白质的食物。吃饭时要细嚼慢咽。
21:45：看会电视。这个时间看会儿电视放松一下，有助于睡眠，但要注意，尽量不要躺在床上看电视，这会影响睡眠质量。
23:00：洗个热水澡。“体温的适当降低有助于放松和睡眠。”拉夫堡大学睡眠研究中心吉姆·霍恩教授说。
23:30：上床睡觉。如果你早上7点30起床，现在入睡可以保证你享受8小时充足的睡眠。任何试图更改生物钟的行为，都将给身体留下莫名其妙的疾病，20、30年之后再后悔，已经来不及了。
一、晚上9-11点为免疫系统（淋巴）排毒时间，此段时间应安静或听音乐。
二、晚间11-凌晨1点，肝的排毒，需在熟睡中进行。
三、凌晨1-3点，胆的排毒，亦同。
四、凌晨3-5点，肺的排毒。此即为何咳嗽的人在这段时间咳得最剧烈，因排毒动作已走到肺；不应用止咳药，以免抑制废积物的排除。
五、凌晨5-7点，大肠的排毒，应上厕所排便。
六、凌晨7-9点，小肠大量吸收营养的时段，应吃早餐。疗病者最好早吃，在６点半前，养生者在７点半前，不吃早餐者应改变习惯，即使拖到9、10点吃都比不吃好。
七、半夜至凌晨4点为脊椎造血时段，必须熟睡，不宜熬夜。
 记住身体健康作息时间表，安排好你的生活，让你的人生丰富多彩！ 
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.51phx.com/wp-content/uploads/2010/05/http_imgload.png"><img class="alignleft size-medium wp-image-140" title="http_imgload" src="http://www.51phx.com/wp-content/uploads/2010/05/http_imgload-299x300.png" alt="" width="299" height="300" /></a><strong>7:30：起床。</strong>英国威斯敏斯特大学的研究人员发现，那些在早上5:22―7:21 分起床的人，其血液中有一种能引起心脏病的物质含量较高，因此，在7:21之后起床对身体健康更加有益。<br />
打开台灯。“一醒来，就将灯打开，这样将会重新调整体内的生物钟，调整睡眠和醒来模式。”拉夫堡大学睡眠研究中心教授吉姆·霍恩说。<br />
喝一杯水。水是身体内成千上万化学反应得以进行的必需物质。早上喝一杯清水，可以补充晚上的缺水状态。</p>
<p><strong>7:30―8:00：在早饭之前刷牙。</strong>“在早饭之前刷牙可以防止牙齿的腐蚀，因为刷牙之后，可以在牙齿外面涂上一层含氟的保护层。要么，就等早饭之后半小时再刷牙。”英国牙齿协会健康和安全研究人员戈登·沃特金斯说。</p>
<p><strong>8:00―8:30：吃早饭。</strong>“早饭必须吃，因为它可以帮助你维持血糖水平的稳定。”伦敦大学国王学院营养师凯文·威尔伦说。早饭可以吃燕麦粥等，这类食物具有较低的血糖指数。</p>
<p><span id="more-139"></span></p>
<p><strong>8:30―9:00：避免运动。</strong>来自布鲁奈尔大学的研究人员发现，在早晨进行锻炼的运动员更容易感染疾病，因为免疫系统在这个时间的功能最弱。步行上班。马萨诸塞州大学医学院的研究人员发现，每天走路的人，比那些久坐不运动的人患感冒病的几率低25%。</p>
<p><strong>9:30：开始一天中最困难的工作。</strong>纽约睡眠中心的研究人员发现，大部分人在每天醒来的一两个小时内头脑最清醒。</p>
<p><strong>10:30：让眼睛离开屏幕休息一下。</strong>如果你使用电脑工作，那么每工作一小时，就让眼睛休息3分钟。</p>
<p><strong>11:00：吃点水果。</strong>这是一种解决身体血糖下降的好方法。吃一个橙子或一些红色水果，这样做能同时补充体内的铁含量和维生素C含量。</p>
<p><strong>13:00：在面包上加一些豆类蔬菜。</strong>你需要一顿可口的午餐，并且能够缓慢地释放能量。“烘烤的豆类食品富含纤维素，番茄酱可以当作是蔬菜的一部分。”维伦博士说。</p>
<p><strong>14:30―15:30：午休一小会儿。</strong>雅典的一所大学研究发现，那些每天中午午休30分钟或更长时间，每周至少午休3次的人，因心脏病死亡的几率会下降37%。</p>
<p><strong>16:00：喝杯酸奶。</strong>这样做可以稳定血糖水平。在每天三餐之间喝些酸牛奶，有利于心脏健康。</p>
<p><strong>17:00―19:00：锻炼身体。</strong>根据体内的生物钟，这个时间是运动的最佳时间，舍菲尔德大**动学医生瑞沃·尼克说。</p>
<p><strong>19:30：晚餐少吃点。</strong>晚饭吃太多，会引起血糖升高，并增加消化系统的负担，影响睡眠。晚饭应该多吃蔬菜，少吃富含卡路里和蛋白质的食物。吃饭时要细嚼慢咽。</p>
<p><strong>21:45：看会电视。</strong>这个时间看会儿电视放松一下，有助于睡眠，但要注意，尽量不要躺在床上看电视，这会影响睡眠质量。</p>
<p><strong>23:00：洗个热水澡。</strong>“体温的适当降低有助于放松和睡眠。”拉夫堡大学睡眠研究中心吉姆·霍恩教授说。</p>
<p><strong>23:30：上床睡觉。</strong>如果你早上7点30起床，现在入睡可以保证你享受8小时充足的睡眠。任何试图更改生物钟的行为，都将给身体留下莫名其妙的疾病，20、30年之后再后悔，已经来不及了。<br />
一、晚上9-11点为免疫系统（淋巴）排毒时间，此段时间应安静或听音乐。</p>
<p>二、晚间11-凌晨1点，肝的排毒，需在熟睡中进行。</p>
<p>三、凌晨1-3点，胆的排毒，亦同。</p>
<p>四、凌晨3-5点，肺的排毒。此即为何咳嗽的人在这段时间咳得最剧烈，因排毒动作已走到肺；不应用止咳药，以免抑制废积物的排除。</p>
<p>五、凌晨5-7点，大肠的排毒，应上厕所排便。</p>
<p>六、凌晨7-9点，小肠大量吸收营养的时段，应吃早餐。疗病者最好早吃，在６点半前，养生者在７点半前，不吃早餐者应改变习惯，即使拖到9、10点吃都比不吃好。</p>
<p>七、半夜至凌晨4点为脊椎造血时段，必须熟睡，不宜熬夜。</p>
<p> 记住身体健康作息时间表，安排好你的生活，让你的人生丰富多彩！ <!--文章正文 结束--><!--分享信息 开始--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.51phx.com/archives/139/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Struts简介</title>
		<link>http://www.51phx.com/archives/100</link>
		<comments>http://www.51phx.com/archives/100#comments</comments>
		<pubDate>Fri, 05 Feb 2010 08:40:01 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[JAVA again JAVA]]></category>

		<guid isPermaLink="false">http://www.51phx.com/?p=100</guid>
		<description><![CDATA[一。Struts2.0簡介

  Struts2.0是從WebWork基礎上發展起來的.從某種程度上來講，Struts2沒有繼承Struts1的血統，而是繼承了WebWork的血統.或者說,WebWork衍生出了Struts2,而不是Struts1衍生了Struts2.因為Struts2是WebWork的升級，而不是一個全新的框架，因此穩定性等各方面都有很好的保證:而且吸收了Struts1和WebWork兩者的優勢。

  二.為什么要使用struts2.0


  三.Struts2.0的MVC架構

  控制器是控制请求的转发和拦截。控制器将请求转发到相应的Action然后填充视图，从而进行展现。
 四. Struts2.0的核心組件

五.  Struts2.0的基本流程

六.  Struts2的基本流程
         FilterDispatcher是struts2框架的核心控制器,該控制器作為一個Filter運行在Web應用中,它負責攔截所有的用戶請求，當用戶請求到達時，該Filter會鍋爐用戶請求.如果用戶請求以action結尾 ,該請求將被轉入Struts2框架處理.         Struts2框架獲得了.action請求后,將根據*.action請求的前面部分決定調用哪個業務邏輯組件,例如,對于login.action請求,Struts2調用名為login的Action來處理該請求.         struts2應用中的Action都被定義在struts.xml文件中,在該文件中定義Action時,定義了該Action的name屬性和class屬性,其中name屬性決定了該Action處理哪個用戶請求,而class屬性決定了該Action的實現類.       Struts2用于處理用戶請求的Action實例,并不是用戶實現的業務控制器，而是Action代理--因為用戶實現的業務控制器并沒有和Servlet API耦合,顯然無法處理用戶請求.而Struts2框架提供了系列攔截器，該系列攔截器負責將HttpServletRequest請求中的請求參數解析出來,傳入到Action中,并回調Action的execute方法來處理用戶請求.
七.  代碼分析 
1.
  JSP頁面： 
&#60;html&#62;
&#60;head&#62;
&#60;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&#62; &#60;title&#62;Insert title here&#60;/title&#62; &#60;/head&#62;
&#60;body&#62; &#60;form action="login.action"&#62; 姓名：&#60;input/&#62; &#60;br&#62; 密碼：&#60;input/&#62; &#60;br&#62; &#60;input value="注冊"/&#62; &#60;/form&#62; &#60;/body&#62;
&#60;/html&#62;
  struts.xml配置文件 
&#60;?xml version="1.0" encoding="UTF-8" ?&#62; &#60;!DOCTYPE struts PUBLIC     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"     "http://struts.apache.org/dtds/struts-2.0.dtd"&#62; [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>一。Struts2.0<strong><em>簡介</em></strong></em></strong></p>
<p><strong><em><a href="http://www.51phx.com/wp-content/uploads/2010/02/5.png"><img class="size-medium wp-image-107 alignleft" src="http://www.51phx.com/wp-content/uploads/2010/02/5-300x114.png" alt="" width="300" height="114" /></a><a href="http://www.51phx.com/wp-content/uploads/2010/02/2.png"></a></em></strong></p>
<p>  Struts2.0是從<strong>WebWork</strong><strong>基礎上發展起來的</strong><strong>.</strong><strong>從某種程度上來講，</strong><strong>Struts2</strong><strong>沒有繼承</strong><strong>Struts1</strong><strong>的血統，而是繼承了</strong><strong>WebWork</strong><strong>的血統</strong><strong>.</strong><strong>或者說</strong><strong>,WebWork</strong><strong>衍生出了</strong><strong>Struts2,</strong><strong>而不是</strong><strong>Struts1</strong><strong>衍生了</strong><strong>Struts2.</strong><strong>因為</strong><strong>Struts2</strong><strong>是</strong><strong>WebWork</strong><strong>的升級，而不是一個全新的框架，因此穩定性等各方面都有很好的保證</strong><strong>:</strong><strong>而且吸收了</strong><strong>Struts1</strong><strong>和</strong><strong>WebWork</strong><strong>兩者的優勢</strong><strong>。</strong></p>
<p><span id="more-100"></span></p>
<p>  二.<strong><em>為什么要使用</em></strong><strong><em>struts2.0</em></strong></p>
<p><a href="http://www.51phx.com/wp-content/uploads/2010/02/1.png"></a><a href="http://www.51phx.com/wp-content/uploads/2010/02/2.png"></a></p>
<p><a href="http://www.51phx.com/wp-content/uploads/2010/02/1.png"><img class="alignnone size-medium wp-image-103" src="http://www.51phx.com/wp-content/uploads/2010/02/1-300x197.png" alt="" width="300" height="197" /></a></p>
<p>  三.<strong><em>Struts2.0</em></strong><strong><em>的</em></strong><strong><em>MVC</em></strong><strong><em>架構</em></strong></p>
<p><a href="http://www.51phx.com/wp-content/uploads/2010/02/2.png"><img class="alignnone size-medium wp-image-104" src="http://www.51phx.com/wp-content/uploads/2010/02/2-299x185.png" alt="" width="299" height="185" /></a></p>
<p>  <strong>控制器是控制请求的转发和拦截。控制器将请求转发到相应的</strong><strong>Action</strong><strong>然后填充视图，从而进行展现。</strong></p>
<p> 四. <strong><em>Struts2.0</em></strong><strong><em>的核心組件</em></strong></p>
<p><a href="http://www.51phx.com/wp-content/uploads/2010/02/3.png"><img class="alignnone size-medium wp-image-105" src="http://www.51phx.com/wp-content/uploads/2010/02/3-300x196.png" alt="" width="300" height="196" /></a></p>
<p><strong>五.  <strong><em>Struts2.0</em></strong><strong><em>的基本流程</em></strong></strong></p>
<p><a href="http://www.51phx.com/wp-content/uploads/2010/02/4.jpg"><img class="alignnone size-medium wp-image-106" src="http://www.51phx.com/wp-content/uploads/2010/02/4-300x286.jpg" alt="" width="300" height="286" /></a></p>
<p>六.  <strong><em>Struts2</em></strong><strong><em>的基本流程</em></strong></p>
<p>         FilterDispatcher是struts2框架的核心控制器,該控制器作為一個Filter運行在Web應用中,它負責攔截所有的用戶請求，當用戶請求到達時，該Filter會鍋爐用戶請求.如果用戶請求以action結尾 ,該請求將被轉入Struts2框架處理.         Struts2框架獲得了.action請求后,將根據*.action請求的前面部分決定調用哪個業務邏輯組件,例如,對于login.action請求,Struts2調用名為login的Action來處理該請求.         struts2應用中的Action都被定義在struts.xml文件中,在該文件中定義Action時,定義了該Action的name屬性和class屬性,其中name屬性決定了該Action處理哪個用戶請求,而class屬性決定了該Action的實現類.       Struts2用于處理用戶請求的Action實例,并不是用戶實現的業務控制器，而是Action代理--因為用戶實現的業務控制器并沒有和Servlet API耦合,顯然無法處理用戶請求.而Struts2框架提供了系列攔截器，該系列攔截器負責將HttpServletRequest請求中的請求參數解析出來,傳入到Action中,并回調Action的execute方法來處理用戶請求.</p>
<p>七.  <strong><em>代碼分析 </em></strong></p>
<p><strong><em>1.</em></strong></p>
<p>  <strong><em>JSP</em></strong><strong><em>頁面： </em></strong></p>
<p>&lt;html&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;title&gt;Insert title here&lt;/title&gt; &lt;/head&gt;</p>
<p>&lt;body&gt; &lt;form action="login.action"&gt; 姓名：&lt;input/&gt; &lt;br&gt; 密碼：&lt;input/&gt; &lt;br&gt; &lt;input value="注冊"/&gt; &lt;/form&gt; &lt;/body&gt;</p>
<p>&lt;/html&gt;</p>
<p>  <strong><em>struts.xml</em></strong><strong><em>配置文件 </em></strong></p>
<p>&lt;?xml version="1.0" encoding="UTF-8" ?&gt; &lt;!DOCTYPE struts PUBLIC     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"     "http://struts.apache.org/dtds/struts-2.0.dtd"&gt; &lt;struts&gt; &lt;!--Struts 2的Action都必須配置在package里--&gt; &lt;packagemso-fareast-font-family: 新細明體; mso-hansi-font-family: Arial; mso-ansi-language: EN-US"&gt;ee"" extends="struts-default"&gt;                &lt;!--定義一個Login的Action,實現類為com.mateng.LoginAction --&gt; &lt;action&gt; &lt;!--配置Action返回success時轉入/ welcome.jsp頁面--&gt; &lt;result&gt;/welcome.jsp&lt;/result&gt; &lt;result&gt;/error.jsp&lt;/result&gt; &lt;/action&gt; &lt;/package&gt; &lt;/struts&gt;</p>
<p><strong>  <em>Java</em></strong><em><strong>文件</strong> </em></p>
<p><strong> </strong><strong>public</strong> <strong>class</strong> LoginAction { <strong>private</strong> String name; <strong>private</strong> String password; ………這里省略get,set方法 <strong>public</strong> String execute() { <strong>if</strong>(name.equals(“Eric")&amp;&amp;password.equals(“123”)){ <strong>ActionContext.getContext().getSession().put(“name”);</strong> <strong>return</strong> "success"; }<strong>else</strong>{ <strong>return</strong> "error"; } } }</p>
<p><a href="http://www.51phx.com/wp-content/uploads/2010/02/2.png"></a></p>
<p><strong><em>  </em></strong></p>
<p><em><strong> </strong><em><strong>web.xml配置文件</strong> </em>    </em></p>
<p><strong><em>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!--web &gt; &lt;web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt; &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;filter&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;filter-class&gt; org.apache.struts2.dispatcher.FilterDispatcher &lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;url-pattern&gt;*.action&lt;/url-pattern&gt; &lt;/filter-mapping&gt; &lt;/web-app&gt;</em></strong></p>
<p><strong><em> </em></strong></p>
<p><strong><em>2.</em></strong></p>
<p><strong><em>多個</em></strong><strong><em>action</em></strong><strong><em>寫在一個類中</em></strong> </p>
<p><strong><em>struts.xml</em></strong><strong><em>配置文件</em></strong><strong><em>(</em></strong><strong><em>多個</em></strong><strong><em>action</em></strong><strong><em>寫在一個類中</em></strong><strong><em>) </em></strong></p>
<p>&lt;?xml version="1.0" encoding="UTF-8" ?&gt; &lt;!DOCTYPE struts PUBLIC     "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"     "http://struts.apache.org/dtds/struts-2.0.dtd"&gt; &lt;struts&gt; &lt;!--Struts 2的Action都必須配置在package里--&gt; &lt;packageFONT-SIZE: 16pt; mso-fareast-font-family: 新細明體; mso-hansi-font-family: Arial; mso-ansi-language: EN-US"&gt;ee"" extends="struts-default"&gt; &lt;actionFONT-SIZE: 16pt; mso-fareast-font-family: 新細明體; mso-hansi-font-family: Arial; mso-fareast-language: ZH-CN"&gt;stuRegister"stuRegister"&gt; &lt;result&gt;/welcome.jsp&lt;/result&gt; &lt;result&gt;/error.jsp&lt;/result&gt; &lt;/action&gt; &lt;action com.mateng.StudentAction“ method="studentLogin"&gt;        &lt;result&gt;     &lt;param&gt;findAllPlain.action&lt;/param&gt;     &lt;/result&gt;     &lt;result&gt;/stulogin.jsp&lt;/result&gt;    &lt;/action&gt;&lt;/package&gt; &lt;/struts&gt;</p>
<p>  <strong><em>Java</em></strong><strong><em>文件</em></strong><strong><em>(</em></strong><strong><em>多個</em></strong><strong><em>action</em></strong><strong><em>寫在一個類中</em></strong><strong><em>) </em></strong></p>
<p><strong><em> </em></strong><strong>public</strong> <strong>class</strong> StudentAction <strong>extends</strong> ActionSupport{ <strong>private</strong> String name; <strong> </strong><strong>private</strong> String password; ………這里省略get,set方法 <strong>public</strong> String stuRegister() <strong>throws</strong> Exception{ …………. } <strong>public</strong> String studentLogin() <strong>throws</strong> Exception{ …………. } }</p>
]]></content:encoded>
			<wfw:commentRss>http://www.51phx.com/archives/100/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Something about Hibernate</title>
		<link>http://www.51phx.com/archives/78</link>
		<comments>http://www.51phx.com/archives/78#comments</comments>
		<pubDate>Fri, 22 Jan 2010 01:55:00 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[JAVA again JAVA]]></category>

		<guid isPermaLink="false">http://www.51phx.com/?p=78</guid>
		<description><![CDATA[I prepared  it  for the meeting  last  week,i hope it will help us to know  Hibernate.
Eric1_Ma     6/1/2010
一.什么是hibernate
1.中間件(軟件):介于數據庫同應用程序之間的軟件
2.ORM工具:位于業務邏輯層和數據庫中間,提供對象-關系的映射,將一個持久化對象保存到數據庫中稱為一條記錄,同面向關系的數據庫進行映射,可以實現內存中數據同數據庫中數據的雙向同步更新
               表現層              （web層）
               業務邏輯層
               持久化層             （jdbc  Hibernate）
               數據庫
二.hibernate涉及的文件
1.POJO:Plain Old Java Objece
2.hibernate配置文件:配置數據庫連接相關的信息
  hibernate.propterties或hibernate.cfg.xml
3.bernate映射文件:配置類和表,屬性和字段等的關系
  xxx.hbm.xml
           類&#60;----------------&#62;表
           屬性&#60;--------------&#62;字段

三.Hibernate的工作原理
   1.Hibernate框架根據hibernate.cfg.xml的配置的信息(URL,Driver,User,Password)來和        數據庫進行通信;
   2.Hibernate框架根據具體的映射文件(如:student.hbm.xml,該文件配置類,類的屬性和表中字段的映射關系)來對對象進行保存,更新,刪除和查詢
   3.核心接口
     1.Configuration:
                   1)對hibernate進行配置,根啟動hibernate
                   2)創建SessionFactory
     2.SessionFactory
            1)重量級的(非常占用資源),不用頻繁的創建,刪除,一般一個數據庫對應一個SessionFacory
         2)線程安全的
         3)緩存sql語句
         4)維護hibernate的二級緩存
         5)用來創建Session
   3.Session:持久化管理器
     1)輕量級的,可以頻繁的創建和刪除,一般一個事務中的操作對應一Session
     2)線程不安全
     3)維護著hibernate的一級緩存
     4)用來執行CRUD操作
          session.save();插入
          session.delete();刪除
          session.update();更新
          session.get();查詢
                [...]]]></description>
			<content:encoded><![CDATA[<p>I prepared  it  for the meeting  last  week,i hope it will help us to know  Hibernate.</p>
<p>Eric1_Ma     6/1/2010</p>
<p><strong>一</strong><strong>.</strong><strong>什么是</strong><strong>hibernate</strong></p>
<p>1.中間件(軟件):介于數據庫同應用程序之間的軟件</p>
<p>2.ORM工具:位于業務邏輯層和數據庫中間,提供對象-關系的映射,將一個持久化對象保存到數據庫中稱為一條記錄,同面向關系的數據庫進行映射,可以實現內存中數據同數據庫中數據的雙向同步更新</p>
<p>               表現層              （web層）</p>
<p>               業務邏輯層</p>
<p>               持久化層             （jdbc  Hibernate）</p>
<p>               數據庫</p>
<p><strong>二</strong><strong>.hibernate</strong><strong>涉及的文件</strong><strong></strong></p>
<p>1.POJO:Plain Old Java Objece</p>
<p>2.hibernate配置文件:配置數據庫連接相關的信息</p>
<p>  hibernate.propterties或hibernate.cfg.xml</p>
<p>3.bernate映射文件:配置類和表,屬性和字段等的關系</p>
<p>  xxx.hbm.xml</p>
<p>           類&lt;----------------&gt;表</p>
<p>           屬性&lt;--------------&gt;字段</p>
<p><span id="more-78"></span></p>
<p><strong>三</strong><strong>.Hibernate</strong><strong>的工作原理</strong><strong></strong></p>
<p>   1.Hibernate框架根據hibernate.cfg.xml的配置的信息(URL,Driver,User,Password)來和        數據庫進行通信;</p>
<p>   2.Hibernate框架根據具體的映射文件(如:student.hbm.xml,該文件配置類,類的屬性和表中字段的映射關系)來對對象進行保存,更新,刪除和查詢</p>
<p>   3.核心接口</p>
<p>     1.Configuration:</p>
<p>                   1)對hibernate進行配置,根啟動hibernate</p>
<p>                   2)創建SessionFactory</p>
<p>     2.SessionFactory</p>
<p>            1)重量級的(非常占用資源),不用頻繁的創建,刪除,一般一個數據庫對應一個SessionFacory</p>
<p>         2)線程安全的</p>
<p>         3)緩存sql語句</p>
<p>         4)維護hibernate的二級緩存</p>
<p>         5)用來創建Session</p>
<p>   3.Session:持久化管理器</p>
<p>     1)輕量級的,可以頻繁的創建和刪除,一般一個事務中的操作對應一Session</p>
<p>     2)線程不安全</p>
<p>     3)維護著hibernate的一級緩存</p>
<p>     4)用來執行CRUD操作</p>
<p>          session.save();插入</p>
<p>          session.delete();刪除</p>
<p>          session.update();更新</p>
<p>          session.get();查詢</p>
<p>                a.數據庫中無對應記錄,返回null</p>
<p>                b.直接到數據庫中去查</p>
<p>                c.不使用代理類</p>
<p>          session.load();查詢</p>
<p>                a.數據庫中無對應記錄,拋出ObjectNotFoundException異常</p>
<p>                b.先到緩存中去查,緩存中沒有再到數據庫中查</p>
<p>                c.使用代理類</p>
<p>   4.Transaction</p>
<p>     hibernate中的事務控制,通過session.beginTransaction()得到</p>
<p>   5.Query</p>
<p>     通過HQL執行查詢操作(查詢的是集合)</p>
<p>     session.createQuery(String queryString)</p>
<p>     sql:select id,name,age from student(表名)</p>
<p>     hql:from Student(類名)</p>
<p>   6.Criteria:擅長于作動態查詢</p>
<p><strong>四</strong><strong>.hibernate</strong><strong>編寫步驟</strong><strong></strong></p>
<p>1)創建配置文件</p>
<p>2)創建POJO類</p>
<p>3)創建映射文件</p>
<p>4)寫程序調用Hibernate的API</p>
<p>  a)創建Configuration</p>
<p>  Configuration config = new Configuration();</p>
<p>  config.configure(".../hibernate.cfg.xml");</p>
<p>  b)創建SessionFactory</p>
<p>  SessionFactory sf=config.buildSessionFactory();</p>
<p>  c)創建Session</p>
<p>  Session session = sf.openSession();</p>
<p>  d)執行CRUD操作(可能涉及到事務)</p>
<p>  Transaction  tran = session.beginTransaction();\</p>
<p>  session.save()...</p>
<p>  session.update()...</p>
<p>  ...</p>
<p>  tran.commit()/rollback();</p>
<p>  e)關閉和數據庫的鏈接</p>
<p>    session.close();</p>
]]></content:encoded>
			<wfw:commentRss>http://www.51phx.com/archives/78/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Daniela&#039;s Spanish language &amp; Chunk&#039;s effort</title>
		<link>http://www.51phx.com/archives/75</link>
		<comments>http://www.51phx.com/archives/75#comments</comments>
		<pubDate>Fri, 22 Jan 2010 01:19:59 +0000</pubDate>
		<dc:creator>Sky</dc:creator>
				<category><![CDATA[我们的路]]></category>

		<guid isPermaLink="false">http://www.51phx.com/?p=75</guid>
		<description><![CDATA[Hi Daniela, I have seen your Spanish language right now, I know nothing about this,
But my new colleague has a french guy, He translated it for me. I understand what your mean.
It is terrific and fantastic.I hope your Spanish must have more develop day by day.So i appreciate with you.
Hi Chunk, Your effort is very [...]]]></description>
			<content:encoded><![CDATA[<p>Hi Daniela, I have seen your Spanish language right now, I know nothing about this,<br />
But my new colleague has a french guy, He translated it for me. I understand what your mean.<br />
It is terrific and fantastic.I hope your Spanish must have more develop day by day.So i appreciate with you.</p>
<p>Hi Chunk, Your effort is very wonderful, I appreciate with you too.please keep this status to do everything.<br />
This phase i will quite busy for my now work. I hope you to do more and more. Now everyday i have a conference by english with many french guy. I really will be craze. Sometimes i can not totally understand it.<br />
no matter, I like it very much. I will sdudy english day by day.Nowadays,english is the most important.</p>
<p>I will work in a busy day, i am lucky today, because it is friday. This week day we will have a good rest .</p>
<p>To know this, so far here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.51phx.com/archives/75/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It Is My First E Article</title>
		<link>http://www.51phx.com/archives/53</link>
		<comments>http://www.51phx.com/archives/53#comments</comments>
		<pubDate>Thu, 21 Jan 2010 14:50:29 +0000</pubDate>
		<dc:creator>Kobe</dc:creator>
				<category><![CDATA[我们的路]]></category>

		<guid isPermaLink="false">http://www.51phx.com/?p=53</guid>
		<description><![CDATA[Today was very cold &#38;  The Damn Railway Bureau!
Hey guys and the only beautiful and sexy girl,I love you all~ Tonight I have maked a logo and uploaded  it to our site.If you have something  to suggest , please tell me, I will change it.
This is my first English article though my English is poor. First I will [...]]]></description>
			<content:encoded><![CDATA[<p>Today was very cold &amp;  The Damn Railway Bureau!<br />
Hey guys and the only beautiful and sexy girl,I love you all~ Tonight I have maked a logo and uploaded  it to our site.If you have something  to suggest , please tell me, I will change it.<br />
This is my first English article though my English is poor. First I will thank daniela,the beautiful and sexy girl,second I thought I was very lucky to met you daniela. The blog is our team's  home,please love our home and'Chang Huijia Look'.<br />
From today I will update the article of our blog  per 2/3  days, the article is about IT Technology,my mood and so on...<br />
I hope eric and hlex can write some article to our blog.Hey! Where R U?<br />
OK,that 's all! This was Chunk's writing,good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.51phx.com/archives/53/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>根据日期获得对应的星期</title>
		<link>http://www.51phx.com/archives/40</link>
		<comments>http://www.51phx.com/archives/40#comments</comments>
		<pubDate>Thu, 21 Jan 2010 03:41:19 +0000</pubDate>
		<dc:creator>Kobe</dc:creator>
				<category><![CDATA[PHP & MYSQL]]></category>

		<guid isPermaLink="false">http://www.51phx.com/?p=40</guid>
		<description><![CDATA[今天处理了一个NetOffice的问题，是如何显示相关日期对应的星期几的问题。
之前的函数不清楚哪个地方出错，所以又重写了一个。一定要熟悉date()函数如何去使用。
 

function getWeekNew&#40;$myMonth,$myDay,$myYear&#41;&#123;
 $arr_date = array&#40;&#34;星期日&#34;,&#34;星期一&#34;,&#34;星期二&#34;,&#34;星期三&#34;,&#34;星期四&#34;,&#34;星期五&#34;,&#34;星期六&#34;&#41;;
 if&#40;checkdate&#40;$myMonth,$myDay,$myYear&#41;&#41;&#123;
  if&#40;strlen&#40;$myMonth&#41; == 1 &#41; &#123;
   $myMonth = &#34;0&#34;.$myMonth;
  &#125;
  $mydate = $myYear.&#34;-&#34;.$myMonth.&#34;-&#34;.$myDay;
  $myweek = $arr_date&#91;date&#40;'w',strtotime&#40;$mydate&#41;&#41;&#93;;
  return $myweek;
 &#125; else &#123;
  return &#34;Wrong Date!!&#34;;
 &#125;
&#125;

]]></description>
			<content:encoded><![CDATA[<p>今天处理了一个NetOffice的问题，是如何显示相关日期对应的星期几的问题。<br />
之前的函数不清楚哪个地方出错，所以又重写了一个。一定要熟悉date()函数如何去使用。<br />
 </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> getWeekNew<span style="color: #009900;">&#40;</span><span style="color: #000088;">$myMonth</span><span style="color: #339933;">,</span><span style="color: #000088;">$myDay</span><span style="color: #339933;">,</span><span style="color: #000088;">$myYear</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$arr_date</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;星期日&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;星期一&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;星期二&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;星期三&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;星期四&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;星期五&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;星期六&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">checkdate</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$myMonth</span><span style="color: #339933;">,</span><span style="color: #000088;">$myDay</span><span style="color: #339933;">,</span><span style="color: #000088;">$myYear</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$myMonth</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000088;">$myMonth</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$myMonth</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000088;">$mydate</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$myYear</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$myMonth</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$myDay</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$myweek</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$arr_date</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'w'</span><span style="color: #339933;">,</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mydate</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$myweek</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;Wrong Date!!&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.51phx.com/archives/40/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The weather temperature reduction</title>
		<link>http://www.51phx.com/archives/36</link>
		<comments>http://www.51phx.com/archives/36#comments</comments>
		<pubDate>Thu, 21 Jan 2010 01:06:07 +0000</pubDate>
		<dc:creator>Sky</dc:creator>
				<category><![CDATA[我们的路]]></category>

		<guid isPermaLink="false">http://www.51phx.com/?p=36</guid>
		<description><![CDATA[Today the temperature is come down deeply, Please everyone notice this .Keep your clothes.
I go to office by bus everyday,&#160; the bus is very crowd. There are many many people in the bus .My shoes and trousers are dirty by them.
I am very angry for this, but I can do&#160; nothing, it is no method. [...]]]></description>
			<content:encoded><![CDATA[<p>Today the temperature is come down deeply, Please everyone notice this .Keep your clothes.</p>
<p>I go to office by bus everyday,&nbsp; the bus is very crowd. There are many many people in the bus .My shoes and trousers are dirty by them.</p>
<p>I am very angry for this, but I can do&nbsp; nothing, it is no method. It is time heavy traffic. Many many people go to work by bus.</p>
<p>Today&nbsp; i will give one sentence for everyday by english. Maybe it can be improve everyone's english level.</p>
<p>I hope we can together do this. i will work,because my boss is come here. so ....&nbsp; in so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.51phx.com/archives/36/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I will modify system so complicate</title>
		<link>http://www.51phx.com/archives/32</link>
		<comments>http://www.51phx.com/archives/32#comments</comments>
		<pubDate>Wed, 20 Jan 2010 01:55:39 +0000</pubDate>
		<dc:creator>Sky</dc:creator>
				<category><![CDATA[我们的路]]></category>

		<guid isPermaLink="false">http://www.51phx.com/?p=32</guid>
		<description><![CDATA[I will modify system whose name is novaline system, I will add many modules in this project. Order management, Warehouse
management,Purchasing management, Production control,Human Resources and so on. it is complicate, I know&#160;only a little
imformation about this. I will be crazy. But it does not matter. I have a full confident for everything.
I will go to [...]]]></description>
			<content:encoded><![CDATA[<p>I will modify system whose name is novaline system, I will add many modules in this project. Order management, Warehouse</p>
<p>management,Purchasing management, Production control,Human Resources and so on. it is complicate, I know&nbsp;only a little</p>
<p>imformation about this. I will be crazy. But it does not matter. I have a full confident for everything.</p>
<p>I will go to SuZhou to accept new project with foreign person who&nbsp;is from french.</p>
<p>I will go to GuangZhou&nbsp; to talk with user about system new functions.</p>
<p>I will be busy, I think i will study several knowledge except software development. Come on.</p>
<p>Sky_Meng</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.51phx.com/archives/32/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Week Pass,Everything is still.</title>
		<link>http://www.51phx.com/archives/24</link>
		<comments>http://www.51phx.com/archives/24#comments</comments>
		<pubDate>Mon, 18 Jan 2010 01:00:26 +0000</pubDate>
		<dc:creator>Sky</dc:creator>
				<category><![CDATA[我们的路]]></category>

		<guid isPermaLink="false">http://www.51phx.com/archives/24</guid>
		<description><![CDATA[Hello. Everyone ,
A week pass, I am ok for everything, I prepare to accept new project. I have&#160;4 projects&#160; on hand, but they are very small. It does not
matter. Nowadays My mood just soso for everything. My software skills has not&#160;&#160;progress a little. &#160;&#160;I appreciate only english.&#160; English is
very important. say it again, please notice [...]]]></description>
			<content:encoded><![CDATA[<p>Hello. Everyone ,</p>
<p>A week pass, I am ok for everything, I prepare to accept new project. I have&nbsp;4 projects&nbsp; on hand, but they are very small. It does not<br />
matter. Nowadays My mood just soso for everything. My software skills has not&nbsp;&nbsp;progress a little. &nbsp;&nbsp;I appreciate only english.&nbsp; English is<br />
very important. say it again, please notice this.&nbsp; I want to study and review lots of skills , Today is monday, The working time is coming,<br />
I will work in office, right away&nbsp;there,&nbsp;see you!</p>
<p>Sky_meng</p>
]]></content:encoded>
			<wfw:commentRss>http://www.51phx.com/archives/24/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
