锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲一日韩欧美中文字幕在线,亚洲色欲一区二区三区在线观看,国产成人亚洲综合一区http://m.tkk7.com/wuxufeng8080/category/18789.html寮辨按涓夊崈錛屽彧鍙栦竴鐡紝渚胯兘瑙f復錛涗經娉曟棤杈癸紝濂夎涓娉曪紝渚胯兘寰楃泭銆?/description>zh-cnTue, 24 Nov 2009 08:47:57 GMTTue, 24 Nov 2009 08:47:57 GMT60struts2 琛ㄥ崟灞炴ф槧灝勭殑闂http://m.tkk7.com/wuxufeng8080/archive/2009/08/04/289788.html椋庝漢鍥?/dc:creator>椋庝漢鍥?/author>Tue, 04 Aug 2009 07:52:00 GMThttp://m.tkk7.com/wuxufeng8080/archive/2009/08/04/289788.htmlhttp://m.tkk7.com/wuxufeng8080/comments/289788.htmlhttp://m.tkk7.com/wuxufeng8080/archive/2009/08/04/289788.html#Feedback0http://m.tkk7.com/wuxufeng8080/comments/commentRss/289788.htmlhttp://m.tkk7.com/wuxufeng8080/services/trackbacks/289788.html
浣跨敤鏂頒笢瑗跨殑鏃跺欐垨澶氭垨灝戜細鍑虹幇榪欐牱閭f牱鐨勯棶棰橈紝榪欏鑷村緢澶氫漢涓嶆効鎰忔洿鎹㈠師鏉ョ殑妗嗘灦錛屼竴鎹㈠張瑕佸涓涓ぇ鍫嗕笢瑗匡紝澶勭悊涓澶у爢寮傚父銆備絾鏄垜浠繖浜涘仛寮鍙戠殑錛屼笉瀛︿範浣跨敤鏂扮殑 涓滆タ錛屽氨浼氳娣樻卑銆傝繖涓涓氱殑鎮插搥鍟婏紝褰撳垵涔熶笉鐭ラ亾鎬庝箞閫夋嫨浜嗚繖涓涓氥?br />
浠ヤ笂鏄澶栬瘽銆?br />
琛ㄥ崟鏄犲皠錛屽湪2閲岄潰鏈変袱縐嶆柟寮忥紝涓涓簨modelDriver錛岀洿鎺ユ槧灝勫埌model閲岄潰銆?br /> 鍙︿竴縐嶆柟寮忓氨鏄氳繃灞炴ф潵褰卞皠錛岄氳繃getter鍜宻etter鏂規硶鏉ヨ幏鍙栧拰璁劇疆鍊箋?br />
鐜板湪鍑虹幇闂鐨勫湪絎簩縐嶆儏鍐碉紝璁懼煎悗錛屼紶鍒伴〉闈紝欏甸潰娌℃湁寰楀埌鍊鹼紝榪欎釜涓嶇煡閬撲粈涔堢紭鏁咃紝鎰熻鏈夊彲鑳芥槸欏甸潰杞彂鐨勯棶棰樸傝繖涓繕瑕佸ソ濂界湅鐪嬭祫鏂欑爺絀朵竴涓嬨?br />
錛氾級

//==========================================================================
2009-11-17
濂戒箙浠ュ墠鐨勯棶棰樹簡錛屼粖澶╃粓浜庢湁浜嗙瓟妗堬紝鍘熸潵閮芥槸ValueStack鎯圭殑銆傚叾瀹炰篃鎬嚜宸憋紝涓鐩存病鏈夌┖鎶妔truts2鐨勫師鐞嗗ソ濂界殑鐪嬬湅錛岃繕浠ヤ負璺熶互鍓嶇殑涓滆タ涓鏍峰憿銆?br />
闂鏄繖鏍風殑錛屽湪action閲屽畾涔変簡灞炴т箣鍚庯紝鏁版嵁閮芥槸瀛樺湪ValueStack閲岄潰鐨勩傚鏋滀綘鐩存帴浣跨敤tag鍙栫殑璇濆氨娌℃湁闂銆備絾鏄綘鎯抽氳繃java浠g爜錛岀敤request鍙栫殑璇濓紝榪欐牱鏄彇涓嶅嚭鏉ョ殑銆?br />
浠婂ぉ緇堜簬鍙戠幇浜嗚繖涓棶棰樼殑鍘熷洜銆?br /> 榪欎簺灞炴у彲浠ラ氳繃request鍙栵紝浣嗘槸棣栧厛瑕佸幓鐨刅alueStack錛岀劧鍚庝粠ValueStack閲岄潰鎶婅繖涓煎彇鍑烘潵銆?br /> 濡傦細
ValueStack vs = request.getAttribute(struts.valueStack);
鐒跺悗鏍規嵁灞炴у悕縐幫紝浠巚s涓幏鍙栬繖涓璞″箋?br /> vs.find("value");

榪欐牱灝卞彲浠ユ妸鏁版嵁鍙栧嚭鏉ラ氳繃java浠g爜鏉ユ搷浣滀簡銆傚惁鍒欏彧鑳戒嬌鐢╯truts2鑷甫鐨則ag鏉ヨ繍琛屻?br />
榪欎釜鏄粖澶╃殑涓澶ф敹鑾楓?

]]>
struts2 -- Action Configuration (緲昏瘧)http://m.tkk7.com/wuxufeng8080/archive/2007/07/06/128496.html椋庝漢鍥?/dc:creator>椋庝漢鍥?/author>Fri, 06 Jul 2007 01:51:00 GMThttp://m.tkk7.com/wuxufeng8080/archive/2007/07/06/128496.htmlhttp://m.tkk7.com/wuxufeng8080/comments/128496.htmlhttp://m.tkk7.com/wuxufeng8080/archive/2007/07/06/128496.html#Feedback0http://m.tkk7.com/wuxufeng8080/comments/commentRss/128496.htmlhttp://m.tkk7.com/wuxufeng8080/services/trackbacks/128496.htmlAction Mappings
   Action鏄犲皠鍙互鎸囧畾涓緇剅esult綾誨瀷錛屼竴緇勫紓甯稿鐞嗭紝涓涓嫤鎴櫒鍫嗐備絾鏄彧鏈塶ame灞炴ф槸蹇呴』鐨勩傚叾浠栫殑灞炴ч兘鍙互閫氳繃package鑼冨洿鎻愪緵銆?br>涓涓櫥褰昦ction
<action name="Logon" class="tutorial.Logon">
  
<result type="redirect-action">Menu</result>
  
<result name="input">/tutorial/Logon.jsp</result>
</action>
Action Names
       鍦╳eb搴旂敤涓紝name灞炴ф槸鐢ㄤ互鍖歸厤嫻忚鍣ㄨ姹傝礬寰勭殑涓閮ㄥ垎錛堟垨鍏朵粬HTTP瀹㈡埛绔級銆俧ramework浼氫涪鎺変富鏈哄悕銆佸簲鐢ㄥ悕鍜屾墿灞曞悕錛屽茍鍖歸厤涓棿閮ㄥ垎銆傛墍浠ワ紝涓涓?tt>http://www.planetstruts.org/struts2-mailreader/Welcome.do 浼歮ap鍒?Welcome action銆?br>

鍦ㄥ簲鐢ㄤ腑錛岃繖涓埌action鐨勯摼鎺ヤ竴鑸槸鐢眘truts tag鏉ヨ嚜鍔ㄤ駭鐢熺殑銆傝繖涓猼ag閫氳繃鍚嶅瓧鏉ユ寚瀹歛ction錛屽茍涓旇繖涓猣ramework浼氬姞涓婇粯璁ゆ墿灞曞悕鍜屽叾浠栦竴浜涘繀欏?鐨勪笢瑗褲?/p>

<s:form action="Hello">
    
<s:textfield label="Please enter your name" name="name"/>
    
<s:submit/>
</s:form>
Wildcard Method
      澶氭暟鎯呭喌錛屼竴緇刟ction mapping浼氭湁涓涓叡浜ā寮忋傛瘮濡傦紝浣犳墍鏈夌殑 edit actions閮戒竴涓?#8220;edit”鎵撳ご錛?騫惰皟鐢ㄨ繖涓猘ction 綾葷殑edit鏂規硶銆俤elete actions涔熸槸榪欎釜妯″紡錛屼絾鏄皟鐢ㄧ殑鏄痙elete鏂規硶銆?br>

榪欑鎯呭喌錛屼綘灝卞彲浠ラ氳繃閫氶厤絎︾殑鏂瑰紡鏉ュ畾涔変竴嬈ction mapping錛岃繙鑳滀簬瀹氫箟姣忎竴涓猘ction mapping.

<action name="*Crud" class="example.Crud" method="{1}">

榪欓噷錛屼竴涓?editCrud"鐨刟ction浼氳皟鐢–rud Action綾誨疄渚嬬殑edit鏂規硶銆傚悓鏍鳳紝涓涓?deleteCrud"鐨刟ction浼氳皟鐢╠elete鏂規硶銆?br>鍙︿竴縐嶅父鐢ㄧ殑鏂規硶灝辨槸鍚庣紑鏂規硶鍚嶏紝閫氳繃璁劇疆"!", "_", 鎴栬呭叾浠栦竴浜涚壒孌婂瓧絎︺?br>

  • "action=Crud_input"
  • "action=Crud_delete"

To use a postfix wildcard, just move the asterisk and add an underscore.

<action name="Crud_*" class="example.Crud" method="{1}">



]]>
struts2--Result Configurationhttp://m.tkk7.com/wuxufeng8080/archive/2007/06/27/126530.html椋庝漢鍥?/dc:creator>椋庝漢鍥?/author>Wed, 27 Jun 2007 03:29:00 GMThttp://m.tkk7.com/wuxufeng8080/archive/2007/06/27/126530.htmlhttp://m.tkk7.com/wuxufeng8080/comments/126530.htmlhttp://m.tkk7.com/wuxufeng8080/archive/2007/06/27/126530.html#Feedback0http://m.tkk7.com/wuxufeng8080/comments/commentRss/126530.htmlhttp://m.tkk7.com/wuxufeng8080/services/trackbacks/126530.html 

褰揂ction綾繪柟娉曞畬鎴愶紝浼氳繑鍥炰竴涓瓧絎︿覆錛岃繖涓瓧絎︿覆鍊肩敤鏉ラ夋嫨result鍏冪礌銆備竴涓猘ction鍙互鏄犲皠鍒頒竴緇勪笉鍚屾弿榪扮殑緇撴灉銆傛爣鍑嗙殑result鏄湪ActionSupport 榪欎釜鍩虹被涓畾涔夌殑銆?/p>

String SUCCESS = "success";
String NONE    
= "none";
String ERROR   
= "error";
String INPUT   
= "input";
String LOGIN   
= "login";

褰撶劧錛宎p鍙互鑷畾涔夊叾浠栫殑result鏍囪鏉atch鐗瑰畾鐨勬儏鍐點?/p>

Result Elements
result鏈夐粯璁ゅ艱瀹氾紝濡傛灉涓嶆寚瀹氬睘鎬э紝鍒欎嬌鐢╯uccess鍜宒ispatch鏉ユ墽琛岃繖涓猺esult

<action name="Hello">
  
<result>/hello/Result.jsp</result>
  
<result name="error">/hello/Error.jsp</result>
  
<result name="input">/hello/Input.jsp</result>
</action>


濡備笂鏄劇ず錛岄粯璁ゆ儏鍐典笅錛屽鏋滆繑鍥炲兼槸success錛屽垯鎵ц絎竴涓猺esult錛屽叾浠栫殑鎯呭喌鎵ц涓嬮潰鐨勫尮閰嶇殑result

Global Results

澶ч儴鍒嗘椂鍊欙紝results閮芥槸宓屽鍦╝ntion鍏冪礌涓備絾鏄緢澶歳esults浼氬簲鐢ㄥ埌涓嶅悓鐨刟ction銆傚湪涓涓畨鍏ㄧ殑搴旂敤涓紝涓涓猚lient璇曞浘璁塊棶涓涓病鏈夎璇佺殑欏甸潰錛岄偅涔堝緢澶歛ction鍙兘閮介渶瑕佸幓璁塊棶 logon result銆?br>濡傛灉action闇瑕佸叡浜玶esult錛?涓緇刧lobal result鍙互涓烘瘡涓涓猵ackage瀹氫箟銆傛鏋墮鍏堟煡璇㈠祵濂楀湪action涓殑鏈湴result錛屽鏋滄湰鍦皉esult娌℃湁絎﹀悎鐨勶紝鍒欏湪global result涓煡璇€?/p>

<global-results>
  
<result name="error">/Error.jsp</result>
  
<result name="invalid.token">/Error.jsp</result>
  
<result name="login" type="redirect-action">Logon!input</result>
</global-results>

 

Dynamic Results
A result may not be known until execution time. Consider the implementation of a state-machine-based execution flow; the next state might depend on any combination of form input elements, session attributes, user roles, moon phase, etc. In other words, determining the next action, input page, etc. may not be known at configuration time.

Result values may be retrieved from its corresponding Action implementation by using EL expressions that access the Action's properties, just like the Struts 2 tag libraries. So given the following Action fragment:
涓涓猘ction鏈夋椂鍊欎笉鍙兘鍦ㄦ墽琛屽墠灝辯煡閬撳畠鐨刟ction錛岃繖縐嶆儏鍐靛氨闇瑕侀氳繃鍔ㄦ乺esult鏉ュ疄鐜般?/p>

 棣栧厛瀹氫箟涓涓睘鎬э紝鏉ュ瓨鏀捐繖涓鹼紝鐒跺悗鍦ㄦ祦紼嬪畾涔変腑閫氳繃EL琛ㄨ揪寮忔潵鍙栧緱榪欎釜灞炴у箋傝繖鏍峰氨鍙互閫氳繃紼嬪簭鍔ㄦ佹寚瀹氶渶瑕佽漿鍙戠殑鍊箋?/p>

private String nextAction;

   public String getNextAction() {
       
return nextAction;
   }

you might define a result like this:
<action name="fragment" class="FragmentAction">
        
<result name="next" type="redirect-action">${nextAction}</result>
</action>
If a FragmentAction method returns "next" the actual value of that result will be whatever is in FragmentAction's nextAction property. So nextAction may be computed based on whatever state information necessary then passed at runtime to "next"'s redirect-action.

鎬葷粨錛宻truts2瀵逛簬result鎻愪緵浜嗗緢澶氬緢鐏墊椿鐨勮緗柟娉曪紝鐢ㄦ埛鍙互浣跨敤鐩稿簲鐨勬柟娉曞鐞嗙壒瀹氱殑閫昏緫銆傚浜庡悇縐嶆儏鍐碉紝鎬昏兘鎵懼嚭鐩稿簲鐨勬柟娉曟潵鍑烘潵銆?br>


]]>
Struts2 flow 閰嶇疆http://m.tkk7.com/wuxufeng8080/archive/2007/05/10/116455.html椋庝漢鍥?/dc:creator>椋庝漢鍥?/author>Thu, 10 May 2007 05:12:00 GMThttp://m.tkk7.com/wuxufeng8080/archive/2007/05/10/116455.htmlhttp://m.tkk7.com/wuxufeng8080/comments/116455.htmlhttp://m.tkk7.com/wuxufeng8080/archive/2007/05/10/116455.html#Feedback0http://m.tkk7.com/wuxufeng8080/comments/commentRss/116455.htmlhttp://m.tkk7.com/wuxufeng8080/services/trackbacks/116455.html1銆侀粯璁ら厤緗?br>2銆佸埆鍚?br>3銆佽繑鍥炵粨鏋?

]]>
Struts2--form璁捐http://m.tkk7.com/wuxufeng8080/archive/2007/05/09/116132.html椋庝漢鍥?/dc:creator>椋庝漢鍥?/author>Wed, 09 May 2007 03:13:00 GMThttp://m.tkk7.com/wuxufeng8080/archive/2007/05/09/116132.htmlhttp://m.tkk7.com/wuxufeng8080/comments/116132.htmlhttp://m.tkk7.com/wuxufeng8080/archive/2007/05/09/116132.html#Feedback0http://m.tkk7.com/wuxufeng8080/comments/commentRss/116132.htmlhttp://m.tkk7.com/wuxufeng8080/services/trackbacks/116132.html1銆乫orm鐨?theme灞炴?/strong>

浣犲彲浠ュ湪<s:form>鍔犱笂theme="simple"灞炴э紝鐒跺悗鑷凡甯冨眬form鐨勮緭鍑恒傚:
<s:form action="Login" method="POST" theme="simple">
<table>
<tr>
<td>
User name: <s:textfield name="name" label="User name"/>
</td>
<td>
Password: <s:password name="password" label="Password"/>
</td>
</tr>
</table>
</s:form>

]]>
Struts 2.0 璧鋒http://m.tkk7.com/wuxufeng8080/archive/2006/12/29/90656.html椋庝漢鍥?/dc:creator>椋庝漢鍥?/author>Fri, 29 Dec 2006 02:09:00 GMThttp://m.tkk7.com/wuxufeng8080/archive/2006/12/29/90656.htmlhttp://m.tkk7.com/wuxufeng8080/comments/90656.htmlhttp://m.tkk7.com/wuxufeng8080/archive/2006/12/29/90656.html#Feedback0http://m.tkk7.com/wuxufeng8080/comments/commentRss/90656.htmlhttp://m.tkk7.com/wuxufeng8080/services/trackbacks/90656.html鍙傝?http://m.tkk7.com/max/category/16130.html

1銆佹坊鍔爏truts2鐨刯ar鍖咃紝struts2-core-2.x.x.jar, struts2-api-2.x.x.jar (struts2-all-2.x.x.jar鍗沖彲錛屽叾浠栫殑struts2鐨勬彃浠跺寘宸茬粡鍖呭惈鍦ㄩ噷闈?銆?br>   濡傛坊鍔犲叾浠栫殑鎻掍歡鍖咃紝鍙兘浼氬嚭鐜版枃浠墮噸澶嶏紝鍏蜂綋鍙互鐪嬪紓甯鎬俊鎭?br>   鎴栬呬笉瑕佸姞all鍖咃紝鑰屼嬌鐢ㄦ彃浠跺寘錛屽彲浠ュ噺灝忓寘鐨勫ぇ灝忋?br>2銆佷慨鏀箇eb.xml

 1 <? xml version="1.0" encoding="UTF-8" ?>
 2 < web-app  version ="2.4"  
 3  xmlns ="http://java.sun.com/xml/ns/j2ee"  
 4  xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"  
 5  xsi:schemaLocation ="http://java.sun.com/xml/ns/j2ee 
 6  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
 7   < display-name > Struts2 Hello World! </ display-name >   
 8
 9     < filter >
10          < filter-name > Struts2 </ filter-name >
11          < filter-class >
12             org.apache.struts2.dispatcher.FilterDispatcher
13          </ filter-class >
14      </ filter >
15      < filter-mapping >   
16          < filter-name > Struts2 </ filter-name >   
17          < url-pattern > /* </ url-pattern >   
18      </ filter-mapping >   
19 </ web-app >
20


3銆佸湪classpath涓嬫坊鍔爏truts.properties鏂囦歡錛屽唴瀹瑰涓?br>struts.devMode = true
struts.enable.DynamicMethodInvocation = false

4銆佸湪classpath涓嬫坊鍔爏truts.xml錛岃繖涓槸瀵瑰簲struts1.x閲岄潰鐨剆truts-config.xml

 1 <! DOCTYPE struts PUBLIC
 2         "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
 3         "http://struts.apache.org/dtds/struts-2.0.dtd" >
 4 < struts >
 5      < package  name ="example"  extends ="struts-default" >
 6          < action  name ="hello"  class ="com.ivo.struts2.HelloWorld"  method ="aliasAction" >
 7              < result > /hello.jsp </ result >
 8          </ action >
 9          < action  name ="Login"  class ="com.ivo.struts2.Login" >
10        < result > /hello.jsp </ result >
11    </ action >
12    < action  name ="LoginX"  class ="com.ivo.struts2.LoginX" >
13        < result > /hello.jsp </ result >
14    </ action >
15      </ package >
16 </ struts >


娉ㄦ剰錛宻truts2鐨勪袱涓浉鍏蟲枃浠墮渶瑕佹斁鍦╟lasspath涓?/p>

]]>
主站蜘蛛池模板: 好久久免费视频高清| 久久久无码精品亚洲日韩蜜桃 | 亚洲人成电影网站国产精品| 亚洲av中文无码字幕色不卡| 成年女人视频网站免费m| 亚洲国产乱码最新视频| 我要看WWW免费看插插视频| 亚洲日本一线产区和二线产区对比| 在线视频观看免费视频18| 亚洲精品伊人久久久久| 四虎成人精品一区二区免费网站| 亚洲中文无码亚洲人成影院| 午夜两性色视频免费网站| 男性gay黄免费网站| 中文亚洲AV片不卡在线观看| a毛片久久免费观看| 亚洲AV无码成人精品区蜜桃 | 免费在线观看自拍性爱视频| 亚洲区小说区图片区| 久久久久久久久久国产精品免费| 亚洲精选在线观看| 成人毛片免费观看视频大全| 美女免费视频一区二区三区| 在线观看亚洲av每日更新| 99视频免费播放| 亚洲人成色77777在线观看| 亚洲成年人啊啊aa在线观看| 久久综合九色综合97免费下载| 亚洲国产成人91精品| 免费国产怡红院在线观看| a级毛片在线免费| 亚洲国产精品专区| 亚洲成AV人在线观看网址| 野花香高清在线观看视频播放免费 | 在线观看H网址免费入口| 在线观看亚洲免费视频| 亚洲无线码一区二区三区| 国产免费AV片在线播放唯爱网| 人人爽人人爽人人片A免费| 亚洲视频在线观看视频| 又黄又爽一线毛片免费观看|