一区中文字幕,国产黄在线播放,91亚洲精品一区http://www.aygfsteel.com/liulu/category/14908.htmlOpen & Open <a title="Free Web Counter"><font color="red"><script src="http://fastwebcounter.com/secure.php?s=www.aygfsteel.com/liulu"></script>hits</font></a>zh-cnFri, 02 Mar 2007 01:56:24 GMTFri, 02 Mar 2007 01:56:24 GMT60Struts HTML 標(biāo)簽庫(kù)詳解http://www.aygfsteel.com/liulu/archive/2006/10/09/74093.html劉璐劉璐Mon, 09 Oct 2006 07:54:00 GMThttp://www.aygfsteel.com/liulu/archive/2006/10/09/74093.htmlhttp://www.aygfsteel.com/liulu/comments/74093.htmlhttp://www.aygfsteel.com/liulu/archive/2006/10/09/74093.html#Feedback0http://www.aygfsteel.com/liulu/comments/commentRss/74093.htmlhttp://www.aygfsteel.com/liulu/services/trackbacks/74093.html<html:html></html:html>:用于生成<html>元素,標(biāo)簽中有一個(gè)lang屬性,用于顯示用戶使用的語(yǔ)言
<html:html lang="true">
如果客戶瀏覽器使用中文語(yǔ)言,那么運(yùn)行時(shí)將被解析為<html lang="zh-CN">

<html:base/>:用于生成當(dāng)前網(wǎng)頁(yè)的絕對(duì)URL路徑

<html:link>、<html:rewrite>:前者用于生成<a>元素,創(chuàng)建超鏈接時(shí)允許在URL中包含請(qǐng)求參數(shù),當(dāng)用戶瀏覽器關(guān)閉Cookie時(shí),會(huì)自動(dòng)重寫URL,把SessionID作為請(qǐng)求參數(shù)包含在URL中,用于跟蹤用戶的Session狀態(tài)。后者用于輸出超鏈接中的URI部分。URI用于具體的請(qǐng)求資源。

劉璐 2006-10-09 15:54 發(fā)表評(píng)論
]]>
struts-config.xml文件詳解http://www.aygfsteel.com/liulu/archive/2006/09/05/67867.html劉璐劉璐Tue, 05 Sep 2006 10:25:00 GMThttp://www.aygfsteel.com/liulu/archive/2006/09/05/67867.htmlhttp://www.aygfsteel.com/liulu/comments/67867.htmlhttp://www.aygfsteel.com/liulu/archive/2006/09/05/67867.html#Feedback1http://www.aygfsteel.com/liulu/comments/commentRss/67867.htmlhttp://www.aygfsteel.com/liulu/services/trackbacks/67867.html <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software

Foundation//DTD Struts Configuration 1.1//EN"

" http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd ">
<struts-config>
<!--配置應(yīng)用所需要的數(shù)據(jù)源-->
?? <data-sources>
?? <data-source

type="org.apache.commons.dbcp.BasicDataSource">
?? ??<set-property property="autoCommit"

value="true"/>
?? ??<set-property property="description"

value="MySQL Data Source"/>
?? ??<set-property property="driverClass"

value="com.mysql.jdbc.Driver"/>
?? ??<set-property property="maxCount" value="10"/>
?? ??<set-property property="minCount" value="2"/>
?? ??<set-property property="user" value="root"/>
?? ??<set-property property="password" value=""/>
?? ??<set-property property="url"

value="jdbc:mysql://localhost:3306/ebooklib"/>
?? </data-source>
<!--配置多個(gè)數(shù)據(jù)源,有key值作標(biāo)識(shí)-->
?<data-source key="A" type="">
?</data-source>
?<data-source key="B" type="">
?</data-source>
?? </data-sources>
<!-- 定義一個(gè)FORM,用來(lái)保存JSP提交的數(shù)據(jù)-->
<!-- 定義一個(gè)ActionForm Bean,名叫registerForm,它對(duì)應(yīng)的類為

com.yourcompany.struts.form.RegisterForm-->??
?? <form-beans>
????? <form-bean name="registerForm"

type="com.yourcompany.struts.form.RegisterForm" />
?? </form-beans>
<!--配置異常處理-->
?? <global-exceptions>
?? ??<exception
?? ?? key="global.error.invalidalogin"http://指定在

Resource Bundle中描述該異常的消息key
?? ?? path="/forms/errors.jsp"http://指定當(dāng)異常發(fā)生時(shí)的

轉(zhuǎn)發(fā)路徑
?? ?? scope="request"http://指定ActionMessage實(shí)例的存放

范圍
?? ??

type="netstore.framework.exceptions.InvalidLoginException"/>//

指所需處理的異常類的名字。
//bundle屬性制定Resource Bundle
?</global-exceptions>
??
?? <global-forwards>
?? ??<forward name="register" //轉(zhuǎn)發(fā)路徑的邏輯名
path="/forms/register.jsp">//制定轉(zhuǎn)發(fā)或重定向的URI
redirect屬性為true時(shí),表示重定向操作;為false時(shí),表示執(zhí)行請(qǐng)求

轉(zhuǎn)發(fā)操作。
</forward>
?? </global-forwards>
?? <action-mappings >
????? <action
???????? attribute="registerForm"http://設(shè)置Action關(guān)聯(lián)的ActionForm

Bean在request或session范圍內(nèi)的屬性key,通過(guò)

request.getAttribute("registerForm")就可以返回該Bean的一個(gè)實(shí)例


//forword屬性指定轉(zhuǎn)發(fā)的URL路徑
???????? input="/forms/register.jsp"http://輸入表單的路徑,驗(yàn)證失敗

的返回路徑
???????? name="registerForm"http://指定和Action關(guān)聯(lián)的ActionForm

Bean的名字,必須在<form-beans>中定義過(guò)。
???????? path="/register"http://指定訪問(wèn)Action的路徑
? forward="register.jsp"http://指定和path匹配的請(qǐng)求轉(zhuǎn)發(fā)路徑

,但用戶請(qǐng)求的URI圍register.do,Struts框架將把請(qǐng)求轉(zhuǎn)發(fā)給

register.jsp
???????? scope="request"http://指定ActionForm Bean 的存在范圍
<!-- validate指定是否執(zhí)行表單驗(yàn)證-->
validate="true"
??????? type="com.yourcompany.struts.action.RegisterAction"

><!-- type指定Action的完整類名-->
<!-- 定義forward,當(dāng)Action里返回success時(shí)就調(diào)用下一個(gè)

successpage.jsp頁(yè)面-->????????
<forward name="success" path="/forms/successpage.jsp" />
???????? <forward name="fail" path="/forms/failturepage.jsp"

/>
????? </action>
?? </action-mappings>
//配置ActionServlet
?? <controller
??? contentType="text/html;charset=UTF-8"http://指定響應(yīng)結(jié)果的內(nèi)容

類型和字符編碼!
??? locale="true"指定是否把locale對(duì)象保存到當(dāng)前用戶的session中

,默認(rèn)false
??? processorClass="CustomRequestProcessor"http://指定負(fù)責(zé)處理請(qǐng)求

的java類的完整類名
/>
//用來(lái)配置Resource Bundle,Resource Bundle用來(lái)存放本地化的消息

文本?? ??
?? <message-resources

parameter="com.yourcompany.struts.ApplicationResources" //指定

Resource Bundle的消息資源的名。
/>
//配置Struts插件
?? <plug-in

className="org.apache.struts.validator.ValidatorPulgIn">
?? ??<set-property property="pathnames"

value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
?? </plug-in>
??
</struts-config>



劉璐 2006-09-05 18:25 發(fā)表評(píng)論
]]>
主站蜘蛛池模板: 开原市| 满洲里市| 锦屏县| 固阳县| 大邑县| 沧州市| 武汉市| 合山市| 郁南县| 吉木乃县| 崇礼县| 运城市| 西贡区| 定兴县| 家居| 施秉县| 绵竹市| 湛江市| 平潭县| 邮箱| 江油市| 太仆寺旗| 方正县| 平果县| 饶阳县| 兴业县| 西吉县| 桐庐县| 扶绥县| 古交市| 泰州市| 普宁市| 宜兰县| 崇义县| 郧西县| 洪泽县| 江西省| 富裕县| 台东县| 东乡族自治县| 江北区|