锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品黄色视频在线观看免费资源,亚洲中文字幕无码永久在线,亚洲AV无码专区日韩http://www.tkk7.com/flyever/鎴戝湪濂嬫枟銆傘傘?/description>zh-cnSat, 10 May 2025 18:49:33 GMTSat, 10 May 2025 18:49:33 GMT60鍏充簬Struts2涓殑鏍囩浠嬬粛錛堜笁錛?/title><link>http://www.tkk7.com/flyever/archive/2008/08/17/222634.html</link><dc:creator>Flyever,Zhang</dc:creator><author>Flyever,Zhang</author><pubDate>Sun, 17 Aug 2008 15:18:00 GMT</pubDate><guid>http://www.tkk7.com/flyever/archive/2008/08/17/222634.html</guid><wfw:comment>http://www.tkk7.com/flyever/comments/222634.html</wfw:comment><comments>http://www.tkk7.com/flyever/archive/2008/08/17/222634.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/flyever/comments/commentRss/222634.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/flyever/services/trackbacks/222634.html</trackback:ping><description><![CDATA[        9銆?lt;s:if>/<s:else>/<s:elseif><br />             榪欎笁縐嶆爣絳鵑氳繃甯冨皵閫昏緫鍊煎姩鎬佹帶鍒墮〉闈㈡樉紺哄唴瀹廣傜浉褰撶紪紼嬭璦涓殑if/else/else if銆傚涓嬩唬鐮佹墍紺猴細(xì)<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"><</span><span style="color: #000000">s:</span><span style="color: #0000ff">if</span><span style="color: #000000"> test</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">-1>0</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />          </span><span style="color: #0000ff">if</span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />      </span><span style="color: #000000"></</span><span style="color: #000000">s:</span><span style="color: #0000ff">if</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />      </span><span style="color: #000000"><</span><span style="color: #000000">s:elseif test</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">2>0</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />          </span><span style="color: #0000ff">else</span><span style="color: #000000"> </span><span style="color: #0000ff">if</span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />      </span><span style="color: #000000"></</span><span style="color: #000000">s:elseif</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />      </span><span style="color: #000000"><</span><span style="color: #000000">s:</span><span style="color: #0000ff">else</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />          </span><span style="color: #0000ff">else</span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />      </span><span style="color: #000000"></</span><span style="color: #000000">s:</span><span style="color: #0000ff">else</span><span style="color: #000000">></span></div>         10銆?lt;s:include><br />         铏界劧JSP鏍囧噯鏍囩搴撲腑宸辯粡鍖呭惈浜唅nclude鏍囩錛屼絾鏄疭truts2榪樻槸瀹氬埗浜嗛傚悎妗嗘灦鐨刬nclude鏍囩銆係truts2鎻愭爣璇ユ爣絳捐姣擩SP涓殑寮哄ぇ銆傝鏍囩鎻愪緵浜嗚闂畍aluestack鐨勫姛鑳斤紝鍏朵腑鐨剉alue灞炴ц兘鍔ㄦ佺殑鐢熸垚瑕佸寘鍚殑欏甸潰URL銆傚錛?lt;s:include value=""/><br />         11銆?lt;s:url><br />         鎻愪緵浜嗕竴縐嶆洿濂界殑灝佽URL鐨勬墜孌點(diǎn)傜ず渚嬩唬鐮佸涓嬫墍紺猴細(xì)<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"><</span><span style="color: #000000">s:url value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">editGadget.action</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />     </span><span style="color: #000000"><</span><span style="color: #000000">s:param name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">id</span><span style="color: #000000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">%{selected}</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"></</span><span style="color: #000000">s:url</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"><</span><span style="color: #000000">s:url action</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">editGadget</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />     </span><span style="color: #000000"><</span><span style="color: #000000">s:param name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">id</span><span style="color: #000000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">%{selected}</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"></</span><span style="color: #000000">s:url</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"><</span><span style="color: #000000">s:url includeParams</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">get</span><span style="color: #000000">"</span><span style="color: #000000">  </span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />     </span><span style="color: #000000"><</span><span style="color: #000000">s:param name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">id</span><span style="color: #000000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">%{'22'}</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"></</span><span style="color: #000000">s:url</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span></div>         12銆?lt;s:i18n><br />         璇ユ爣絳句負(fù)妗嗘灦鍥介檯鍖栨彁渚涗簡鏀寔銆傜ず渚嬩唬鐮佸涓嬫墍紺猴細(xì) <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"><</span><span style="color: #000000">s:i18n name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">myCustomBundle</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />    The i18n value </span><span style="color: #0000ff">for</span><span style="color: #000000"> key aaa.bbb.ccc in myCustomBundle is </span><span style="color: #000000"><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">text('aaa.bbb.ccc')</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"></</span><span style="color: #000000">s:i18n</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"><</span><span style="color: #000000">s:i18n name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">some.package.bundle</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />      </span><span style="color: #000000"><</span><span style="color: #000000">s:text name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">some.key</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"></</span><span style="color: #000000">s:i18n</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span></div>         <span style="color: red">娉?/span>錛歯ame灞炴т負(fù)瑕佷嬌鐢ㄧ殑璧勬簮鐨勬枃浠跺悕銆?br />         13銆?lt;s:text><br />         鐢ㄤ簬鏄劇ず鐗瑰畾鏂囦歡錛屽畠鎻愪緵浜嗗熀浜庡仴鐨勬煡璇紝涓昏鐢ㄥ浗闄呭寲鍔熻兘涓傚錛?lt;s:text name="key"/>銆俷ame灞炴т負(fù)鐗瑰畾鏂囨湰涓殑鍋ュ箋傜ず渚嬩唬鐮佸涓嬫墍紺猴細(xì)<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"><!--</span><span style="color: #000000"> First Example </span><span style="color: #000000">--></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"><</span><span style="color: #000000">s:i18n name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">struts.action.test.i18n.Shop</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />     </span><span style="color: #000000"><</span><span style="color: #000000">s:text name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">main.title</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"></</span><span style="color: #000000">s:i18n</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"><!--</span><span style="color: #000000"> Second Example </span><span style="color: #000000">--></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"><</span><span style="color: #000000">s:text name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">main.title</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"><!--</span><span style="color: #000000"> Third Examlpe </span><span style="color: #000000">--></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"><</span><span style="color: #000000">s:text name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">i18n.label.greetings</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />    </span><span style="color: #000000"><</span><span style="color: #000000">s:param </span><span style="color: #000000">></span><span style="color: #000000">Mr Smith</span><span style="color: #000000"></</span><span style="color: #000000">s:param</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /> </span><span style="color: #000000"></</span><span style="color: #000000">s:text</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span></div>         14銆?lt;s:iterator><br />         鐢ㄤ簬榪唬闆嗗悎涓殑鍐呭錛屽父涓?lt;s:property>鍜?lt;s:if>/<s:elseif>/<s:else>涓璧蜂嬌鐢ㄣ傜ず渚嬩唬鐮佸涓嬶細(xì)<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"><</span><span style="color: #000000">s:iterator value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">userList</span><span style="color: #000000">"</span><span style="color: #000000"> tatus</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">status</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000">   <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />    </span><span style="color: #000000"><</span><span style="color: #000000">tr </span><span style="color: #0000ff">class</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000"><s:if test=</span><span style="color: #000000">"</span><span style="color: #000000">#status.even</span><span style="color: #000000">"</span><span style="color: #000000">>even</s:if><s:else>odd</s:else></span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000">   <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />        </span><span style="color: #000000"><</span><span style="color: #000000">td</span><span style="color: #000000">><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">userid</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000">   <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />        </span><span style="color: #000000"><</span><span style="color: #000000">td</span><span style="color: #000000">><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">username</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></</span><span style="color: #000000">td</span><span style="color: #000000">></span><span style="color: #000000">   <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />        <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />            </span><span style="color: #000000"></</span><span style="color: #000000">tr</span><span style="color: #000000">></span><span style="color: #000000">    <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #000000"></</span><span style="color: #000000">s:iterator</span><span style="color: #000000">></span><span style="color: #000000">   <br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span></div> <span style="color: red">        姝ゅ娌℃湁鍒楀嚭鍚勬爣絳劇殑鍏ㄩ儴灞炴э紝姝ゅ鍒楀嚭鐨勫睘鎬у潎涓哄父鐢ㄥ睘鎬э紝濡傞渶鑾峰緱鏇磋緇嗙殑淇℃伅鍙互鍙傝冨畼鏂規(guī)枃妗c傜▼搴忓潎浜茶嚜璋冭瘯榪囷紝濡傛湁闂錛岃鐣欒█銆?/span> <br />       <span style="color: red"><br /> </span> <img src ="http://www.tkk7.com/flyever/aggbug/222634.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/flyever/" target="_blank">Flyever,Zhang</a> 2008-08-17 23:18 <a href="http://www.tkk7.com/flyever/archive/2008/08/17/222634.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍏充簬Struts2涓殑鏍囩浠嬬粛錛堜簩錛?/title><link>http://www.tkk7.com/flyever/archive/2008/08/17/222600.html</link><dc:creator>Flyever,Zhang</dc:creator><author>Flyever,Zhang</author><pubDate>Sun, 17 Aug 2008 12:07:00 GMT</pubDate><guid>http://www.tkk7.com/flyever/archive/2008/08/17/222600.html</guid><wfw:comment>http://www.tkk7.com/flyever/comments/222600.html</wfw:comment><comments>http://www.tkk7.com/flyever/archive/2008/08/17/222600.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/flyever/comments/commentRss/222600.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/flyever/services/trackbacks/222600.html</trackback:ping><description><![CDATA[        6銆?lt;s:fielderror/><br />         璇ユ爣絳句富瑕佺敤浜庡湪欏甸潰涓婅緭鍑哄湪Action涓緗殑FieldError淇℃伅銆傜敤娉曞涓嬫墍紺猴細(xì)<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #008000">//</span><span style="color: #008000">TestStruts2Tag.java</span><span style="color: #008000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> com.opensymphony.xwork2.ActionSupport;<br /> <img id="Codehighlighter1_118_486_Open_Image" onclick="this.style.display='none'; Codehighlighter1_118_486_Open_Text.style.display='none'; Codehighlighter1_118_486_Closed_Image.style.display='inline'; Codehighlighter1_118_486_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_118_486_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_118_486_Closed_Text.style.display='none'; Codehighlighter1_118_486_Open_Image.style.display='inline'; Codehighlighter1_118_486_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> TestStruts2Tag </span><span style="color: #0000ff">extends</span><span style="color: #000000"> ActionSupport </span><span id="Codehighlighter1_118_486_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_118_486_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />    @Override<br /> <img id="Codehighlighter1_173_232_Open_Image" onclick="this.style.display='none'; Codehighlighter1_173_232_Open_Text.style.display='none'; Codehighlighter1_173_232_Closed_Image.style.display='inline'; Codehighlighter1_173_232_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_173_232_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_173_232_Closed_Text.style.display='none'; Codehighlighter1_173_232_Open_Image.style.display='inline'; Codehighlighter1_173_232_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> String execute() </span><span style="color: #0000ff">throws</span><span style="color: #000000"> Exception </span><span id="Codehighlighter1_173_232_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_173_232_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #008000">//</span><span style="color: #008000"> TODO Auto-generated method stub</span><span style="color: #008000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #000000">        </span><span style="color: #0000ff">return</span><span style="color: #000000">  SUCCESS;<br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />    @Override<br /> <img id="Codehighlighter1_270_484_Open_Image" onclick="this.style.display='none'; Codehighlighter1_270_484_Open_Text.style.display='none'; Codehighlighter1_270_484_Closed_Image.style.display='inline'; Codehighlighter1_270_484_Closed_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_270_484_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_270_484_Closed_Text.style.display='none'; Codehighlighter1_270_484_Open_Image.style.display='inline'; Codehighlighter1_270_484_Open_Text.style.display='inline';" alt="" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> validate() </span><span id="Codehighlighter1_270_484_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_270_484_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #008000">//</span><span style="color: #008000"> TODO Auto-generated method stub</span><span style="color: #008000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #000000">        </span><span style="color: #0000ff">this</span><span style="color: #000000">.addActionError(</span><span style="color: #000000">"</span><span style="color: #000000">actionError!</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">this</span><span style="color: #000000">.addActionMessage(</span><span style="color: #000000">"</span><span style="color: #000000">actionMessage!</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">this</span><span style="color: #000000">.addFieldError(</span><span style="color: #000000">"</span><span style="color: #000000">field</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">"</span><span style="color: #000000">fieldError</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span><span style="color: #0000ff">this</span><span style="color: #000000">.addFieldError(</span><span style="color: #000000">"</span><span style="color: #000000">field2</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">"</span><span style="color: #000000">fieldError2</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/Images/OutliningIndicators/None.gif" align="top" /><span style="color: #008000">//</span><span style="color: #008000">index.jsp閮ㄥ垎浠g爜</span><span style="color: #008000"><br /> <img alt="" src="http://www.tkk7.com/Images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #000000"><</span><span style="color: #000000">s:fielderror</span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/Images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:fielderror</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/Images/OutliningIndicators/None.gif" align="top" />           </span><span style="color: #000000"><</span><span style="color: #000000">s:param</span><span style="color: #000000">></span><span style="color: #000000">field</span><span style="color: #000000"></</span><span style="color: #000000">s:param</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/Images/OutliningIndicators/None.gif" align="top" />           </span><span style="color: #000000"><</span><span style="color: #000000">s:param</span><span style="color: #000000">></span><span style="color: #000000">field2</span><span style="color: #000000"></</span><span style="color: #000000">s:param</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/Images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"></</span><span style="color: #000000">s:fielderror</span><span style="color: #000000">></span></div> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #008000">//</span><span style="color: #008000">struts.xml</span><span style="color: #008000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #000000"><!</span><span style="color: #000000">DOCTYPE struts PUBLIC<br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />    </span><span style="color: #000000">"</span><span style="color: #000000">-//Apache Software Foundation//DTD Struts Configuration 2.0//EN</span><span style="color: #000000">"</span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />    </span><span style="color: #000000">"</span><span style="color: #000000">http://struts.apache.org/dtds/struts-2.0.dtd</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #000000"><</span><span style="color: #000000">struts</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />    </span><span style="color: #000000"><</span><span style="color: #000000">include file</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">struts-default.xml</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />    </span><span style="color: #000000"><</span><span style="color: #0000ff">package</span><span style="color: #000000"> name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">TestStruts2Tag</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #0000ff">extends</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">struts-default</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />        </span><span style="color: #000000"><</span><span style="color: #000000">action name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">testTag</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">TestStruts2Tag</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />            </span><span style="color: #000000"><</span><span style="color: #000000">result name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">success</span><span style="color: #000000">"</span><span style="color: #000000">>/</span><span style="color: #000000">index.jsp</span><span style="color: #000000"></</span><span style="color: #000000">result</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />            </span><span style="color: #000000"><</span><span style="color: #000000">result name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">input</span><span style="color: #000000">"</span><span style="color: #000000">>/</span><span style="color: #000000">index.jsp</span><span style="color: #000000"></</span><span style="color: #000000">result</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />        </span><span style="color: #000000"></</span><span style="color: #000000">action</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />    </span><span style="color: #000000"></</span><span style="color: #0000ff">package</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #000000"></</span><span style="color: #000000">struts</span><span style="color: #000000">></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span></div>         娉細(xì)<s:fielderror />鐢ㄤ簬杈撳嚭鎵鏈塅ieldError淇℃伅銆?br />                 <s:fielderror><br />      銆銆銆銆銆<s:param>field</s:param><br />     銆銆銆銆銆 <s:param>field2</s:param><br />   銆銆銆 </s:fielderror><br />                 鎴?br />                 <s:fielderror><br />          銆銆銆 <s:param value="%{'field'}" /><br />          銆銆銆 <s:param value="%{'field2'}" /><br />    銆銆銆 </s:fielderror><br />                 鐢ㄤ簬杈撳嚭"field"鍜?field2"鐨勪俊鎭?br />             7銆?lt;s:actionerror/><br />             鐢ㄤ簬杈撳嚭ActionError淇℃伅銆傜敤娉曞涓嬫墍紺猴細(xì)<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"><</span><span style="color: #000000">s:actionerror</span><span style="color: #000000">/></span></div>             8銆佺敤浜庤緭鍑篈ctionMessage淇℃伅銆傜敤娉曞涓嬫墍紺猴細(xì)<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"><</span><span style="color: #000000">s:actionmessage</span><span style="color: #000000">/></span></div>            <span style="color: red"> <br /> </span><br /> <img src ="http://www.tkk7.com/flyever/aggbug/222600.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/flyever/" target="_blank">Flyever,Zhang</a> 2008-08-17 20:07 <a href="http://www.tkk7.com/flyever/archive/2008/08/17/222600.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍏充簬Struts2涓殑鏍囩浠嬬粛錛堜竴錛?/title><link>http://www.tkk7.com/flyever/archive/2008/08/17/222560.html</link><dc:creator>Flyever,Zhang</dc:creator><author>Flyever,Zhang</author><pubDate>Sun, 17 Aug 2008 09:22:00 GMT</pubDate><guid>http://www.tkk7.com/flyever/archive/2008/08/17/222560.html</guid><wfw:comment>http://www.tkk7.com/flyever/comments/222560.html</wfw:comment><comments>http://www.tkk7.com/flyever/archive/2008/08/17/222560.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/flyever/comments/commentRss/222560.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/flyever/services/trackbacks/222560.html</trackback:ping><description><![CDATA[        闅忕潃鍚勪釜妗嗘灦鐨勬帹鍑猴紝鍚勬鏋墮兘鏈変簡鑷繁涓撴湁鐨勬爣絳懼簱銆傞櫎浜嗘湁瀹樻柟鐨凧STL鐗瑰埆浼樼澶栵紝鍏跺畠鍚勬鏋舵帹鐨勪篃鐩稿綋鐨勪紭縐銆傛湁浜嗘爣絳撅紝鎴戜滑鍙互璁︰I鍜屼笟鍔¢昏緫涓嶅湪綰犵紶鍦ㄤ竴璧鳳紝涔熶負(fù)鎿嶄綔妯″瀷灞傛彁渚涗簡鏂逛究銆?br />         鍦ㄥStruts2妗嗘灦鐨勬椂鍊欙紝蹇呴』瀛︿範(fàn)瀹冪殑鏍囩錛屽惁鍒欎篃鏄竴縐嶉仐鎲俱?br />         鍦ㄦ鎴戝亣璁綣SP鏂囦歡涓0鏄庝簡<%@ taglib prefix="s" uri="/struts-tags" %>錛屼互S涓哄墠緙銆?br />         1銆?lt;s:property/><br />               灞炴ф爣絳炬槸鐢ㄦ潵鑾峰彇ActionContext涓殑鍐呭銆備緥錛?br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080">1</span><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"><%</span><span style="color: #000000"><br /> </span><span style="color: #008080">2</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />      session.setAttribute(</span><span style="color: #000000">"</span><span style="color: #000000">param1</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">param1</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">3</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />      request.setAttribute(</span><span style="color: #000000">"</span><span style="color: #000000">param2</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">param2</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">4</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />  </span><span style="color: #000000">%></span><span style="color: #000000"><br /> </span><span style="color: #008080">5</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />  </span><span style="color: #000000"><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#session.param1</span><span style="color: #000000">"</span><span style="color: #000000">/><</span><span style="color: #000000">br</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">6</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#request.param2</span><span style="color: #000000">"</span><span style="color: #000000">/><</span><span style="color: #000000">br</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">7</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#session['param1']</span><span style="color: #000000">"</span><span style="color: #000000">/><</span><span style="color: #000000">br</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">8</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#request['param2']</span><span style="color: #000000">"</span><span style="color: #000000">/><</span><span style="color: #000000">br</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">9</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:property </span><span style="color: #0000ff">default</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">defaultvalue</span><span style="color: #000000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">s</span><span style="color: #000000">"</span><span style="color: #000000">/><</span><span style="color: #000000">br</span><span style="color: #000000">></span></div>         <span style="color: red"> 娉?/span>錛氬湪鍙栧洓縐嶅睘鎬ц寖鍥撮噷鐨勫兼椂錛屾垜浠浣跨敤OGNL璇█鏉ユ搷浣滐紝濡傜浜旇鍒扮鍏鎵紺恒傚湪鑾峰彇Action涓殑灞炴ф椂錛屾垜浠笉鐢ㄤ嬌鐢∣GNL璇█鏉ユ搷浣滐紝鐩存帴寰value灞炴т腑鍐欏叆瑕佸彇寰楃殑灞炴у悕鍒欏彲錛屽鏋滆鑾峰彇Action涓煇灞炴т腑鐨勫睘鎬ф椂錛屼嬌鐢ㄧ偣鎿嶄綔絎﹀垯鍙紝濡?lt;s:property  value="company.name"/>銆傚鏋滆鏄劇ず榛樿鍊肩殑璇濓紝浣跨敤defaut灞炴э紝濡傜涔?jié)琛屾墍紺猴紝榪欐椂鏃犺value灞炴у彇浣曞鹼紝鍧囨樉紺洪粯璁ゅ箋?br />         2銆?lt;s:set/><br />          set鏍囩鐢ㄤ簬涓烘寚瀹氱殑鍙橀噺璁懼畾鍊鹼紝瀹冨鍊兼爤涓殑琛ㄨ揪紺鴻繘琛屾眰鍊煎茍灝嗗叾璧嬬粰鎸囧畾鐨勫彉閲忓悕銆傚涓嬫墍紺猴細(xì)<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080"> 1</span><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"> </span><span style="color: #000000"><%</span><span style="color: #000000"><br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />      session.setAttribute(</span><span style="color: #000000">"</span><span style="color: #000000">param1</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">param1</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />        </span><span style="color: #000000">%></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="color: #000000"><</span><span style="color: #000000">s:set name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">param</span><span style="color: #000000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#session.param1</span><span style="color: #000000">"</span><span style="color: #000000">></</span><span style="color: #000000">s:set</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#param</span><span style="color: #000000">"</span><span style="color: #000000">/><</span><span style="color: #000000">br</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:set name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">param</span><span style="color: #000000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#session.param1</span><span style="color: #000000">"</span><span style="color: #000000"> scope</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">request</span><span style="color: #000000">"</span><span style="color: #000000">></</span><span style="color: #000000">s:set</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#request.param</span><span style="color: #000000">"</span><span style="color: #000000">/><</span><span style="color: #000000">br</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:set name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">param</span><span style="color: #000000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#session.param1</span><span style="color: #000000">"</span><span style="color: #000000"> scope</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">session</span><span style="color: #000000">"</span><span style="color: #000000">></</span><span style="color: #000000">s:set</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#session.param</span><span style="color: #000000">"</span><span style="color: #000000">/><</span><span style="color: #000000">br</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:set name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">param</span><span style="color: #000000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#session.param1</span><span style="color: #000000">"</span><span style="color: #000000"> scope</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">application</span><span style="color: #000000">"</span><span style="color: #000000">></</span><span style="color: #000000">s:set</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#application.param</span><span style="color: #000000">"</span><span style="color: #000000">/><</span><span style="color: #000000">br</span><span style="color: #000000">></span></div>           <span style="color: red">娉細(xì)</span>scope鐨勫間負(fù)鍥涚灞炴ц寖鍥翠腑鐨勪竴縐嶃?br />            3銆?lt;s:bean/><br />             鍙互浣跨敤璇ユ爣絳懼垱寤虹畝鍗曠殑JavaBean騫舵妸瀹冨帇鍏aluestack涓傝鏍囩榪樺彲浠ヤ嬌鐢?lt;s:param>璁懼畾鍙傛暟鐨勫箋傚涓嬫墍紺猴細(xì)<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080">1</span><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">s:bean name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">user</span><span style="color: #000000">"</span><span style="color: #000000"> id</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">user</span><span style="color: #000000">"</span><span style="color: #000000">><!-</span><span style="color: #000000">娌℃湁scope灞炴?浼?xì)琚帇鍏aluestack涓?/span><span style="color: #000000">-></span><span style="color: #000000"><br /> </span><span style="color: #008080">2</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />           </span><span style="color: #000000"><</span><span style="color: #000000">s:param name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">name</span><span style="color: #000000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">'flyever,zhang'</span><span style="color: #000000">"</span><span style="color: #000000">></</span><span style="color: #000000">s:param</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">3</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />           </span><span style="color: #000000"><</span><span style="color: #000000">s:param name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">gender</span><span style="color: #000000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">'male'</span><span style="color: #000000">"</span><span style="color: #000000">></</span><span style="color: #000000">s:param</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">4</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"></</span><span style="color: #000000">s:bean</span><span style="color: #000000">></span></div>          <span style="color: red">娉?/span>錛氳繍琛岃紼嬪簭鏃惰繕闇鏂板緩涓User綾匯傚湪鍐欏線value灞炴т腑鍐欏叆瀛楃涓插兼椂錛屼竴瀹氳鐢ㄥ崟寮曞彿鎷搗鏉ワ紝鍚﹀垯浼?xì)琚湄?fù)鏄竴涓彉閲忋?nbsp;<br />          4銆?lt;s:push/><br />             璇ユ爣絳懼彲浠ユ妸紼嬪簭鍛樺湪ActionContext涓紩鐢ㄧ殑瀵瑰儚鍘嬪叆valuestack涓紝涓轟互鍚庤闂璞℃彁渚涗簡鏂逛究銆傚涓嬫墍紺猴細(xì)<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080">1</span><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"> </span><span style="color: #000000"><</span><span style="color: #000000">s:push value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#request.user</span><span style="color: #000000">"</span><span style="color: #000000">></span><span style="color: #000000"><br /> </span><span style="color: #008080">2</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />           </span><span style="color: #000000"><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">name</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> </span><span style="color: #008080">3</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />           </span><span style="color: #000000"><</span><span style="color: #000000">s:property value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">gender</span><span style="color: #000000">"</span><span style="color: #000000">/></span><span style="color: #000000"><br /> </span><span style="color: #008080">4</span><span style="color: #000000"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"></</span><span style="color: #000000">s:push</span><span style="color: #000000">></span><span style="color: #000000">   </span></div>         <span style="color: red">娉?/span>錛氭澶剈ser瀵硅薄涔嬪墠琚墜鍔ㄥ瓨浜巖equest涓?br />         5銆?lt;s:date/><br />         鐢ㄤ簬鏍煎紡鍖栨棩鏈燂紝鏈鍚庤緭鍑哄埌欏甸潰涓傚涓嬫墍紺猴細(xì)<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000"> </span><span style="color: #000000"><%</span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />      Date date</span><span style="color: #000000">=</span><span style="color: #0000ff">new</span><span style="color: #000000"> Date();<br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />      session.setAttribute(</span><span style="color: #000000">"</span><span style="color: #000000">date</span><span style="color: #000000">"</span><span style="color: #000000">,date);<br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000">%></span><span style="color: #000000"><br /> <img alt="" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" />   </span><span style="color: #000000"><</span><span style="color: #000000">s:date name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">#session['date']</span><span style="color: #000000">"</span><span style="color: #000000"> format</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">yy/MM/dd</span><span style="color: #000000">"</span><span style="color: #000000">></</span><span style="color: #000000">s:date</span><span style="color: #000000">></span></div>         <span style="color: red">姝ゅ娌℃湁鍒楀嚭鍚勬爣絳劇殑鍏ㄩ儴灞炴э紝姝ゅ鍒楀嚭鐨勫睘鎬у潎涓哄父鐢ㄥ睘鎬э紝濡傞渶鑾峰緱鏇磋緇嗙殑淇℃伅鍙互鍙傝冨畼鏂規(guī)枃妗c傜▼搴忓潎浜茶嚜璋冭瘯榪囷紝濡傛湁闂錛岃鐣欒█銆?/span> <br />    <span style="color: red"><br /> </span> <img src ="http://www.tkk7.com/flyever/aggbug/222560.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/flyever/" target="_blank">Flyever,Zhang</a> 2008-08-17 17:22 <a href="http://www.tkk7.com/flyever/archive/2008/08/17/222560.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍏充簬Struts2鐜鎼緩鏃跺鍖呯殑闂 http://www.tkk7.com/flyever/archive/2008/08/15/222203.htmlFlyever,ZhangFlyever,ZhangFri, 15 Aug 2008 03:56:00 GMThttp://www.tkk7.com/flyever/archive/2008/08/15/222203.htmlhttp://www.tkk7.com/flyever/comments/222203.htmlhttp://www.tkk7.com/flyever/archive/2008/08/15/222203.html#Feedback0http://www.tkk7.com/flyever/comments/commentRss/222203.htmlhttp://www.tkk7.com/flyever/services/trackbacks/222203.html       鐢變簬struts2妗嗘灦鍦╡clipse涓繕娌℃湁鍍弒truts1.x閭f牱鐨勮寰堝ソ鏀寔銆傛垜浠嬌鐢ㄨ妗嗘灦鐨勬椂鍊欓兘闇瑕佹墜宸ユ惌寤哄紑鍙戠幆澧冿紝鍏跺疄鎯蟲兂榪欎綍灝濅笉鏄竴縐嶅ソ浜嬶紝鐗瑰埆瀵逛簬鍒濆鑰呫傚湪鎵嬪伐鎼緩Struts2寮鍙戠幆澧冪殑鏃跺欙紝鍙互鎸夊涓嬫楠よ繘琛岋紙涓漢瑙傜偣錛夛細(xì)
       1銆佹柊寤轟竴涓猈EB欏圭洰銆?br />        2銆佸線“WEB欏圭洰鏍圭洰褰?WEB-INF/LIB/”涓鍏truts2鎵闇鐨刯ar鍖咃紝濡備笅鎵紺猴紙鐗堟湰鍙峰彲鑳戒笉鍚岋級錛?span style="color: red">鍦ㄦ鏈変竴涓敞鎰忎簨欏癸紝絳変笅鎴戜細(xì)鎻愬埌銆?/p>
commons-logging-1.0.4.jar 
freemarker
-2.3.8.jar 
ognl
-2.6.11.jar 
struts2
-core-2.0.9.jar 
xwork
-2.0.4.jar 

       3銆佸線“WEB欏圭洰鏍圭洰褰?WEB-INF/classes/”涓柊寤簊truts2鎵闇鐨剆truts.xml鏂囦歡錛堝涓嬫墍紺猴細(xì)錛夈?nbsp;               

1<?xml version="1.0" encoding="UTF-8" ?>
2<!DOCTYPE struts PUBLIC
3    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
4    "http://struts.apache.org/dtds/struts-2.0.dtd">
5
6<struts>    
7</struts>
8

       4銆佷慨鏀箇eb.xml鏂囦歡錛屾墍涓嬫墍紺猴紙灝辨槸澧炲姞涓涓猣ilter錛夛細(xì)

 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    <filter>
 8        <filter-name>struts2</filter-name>
 9        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
10    </filter>
11    <filter-mapping>
12        <filter-name>struts2</filter-name>
13        <url-pattern>/*</url-pattern>
14    </filter-mapping>
15</web-app>
16

        5銆佸埌姝わ紝寮鍙戠幆澧冨氨鎼緩濂戒簡錛屼綑涓嬪伐浣滃氨鐪嬩綘鑷繁鐨勪簡銆備綘鍙互鍦ㄤ笂闈㈠敖鎯呮尌媧掍綘鐨勮垶濮褲?br />
        娉ㄦ剰浜嬮」錛?/span>涔熻鍒濆struts2鏈嬪弸浠粡甯鎬細(xì)紕板埌struts2瀵煎寘闂錛屽洜涓哄垵瀛﹁呬笉鏄緢浜嗚В鍒板簳鍝簺鍖呮槸蹇呴』鐨勶紝鍝簺鏄彲閫夌殑錛屾墍浠ョ洸鐩殑鎶婂叏閮↗AR鍖呭鍏ヨ繘鏉ワ紝浣嗗疄闄呬綘榪欐牱鍋氫細(xì)鍑虹幇闂錛屽叏閮ㄥ鍏ュ悗錛屼細(xì)鍙戠敓鍐茬獊錛岄儴緗查」鐩椂錛屽皢浼?xì)鍑虹幇濡備笅閿欒锛寵骞鐩疄畣鏃犳硶鍚姩锛?xì)

 1淇℃伅: Parsing configuration file [struts-plugin.xml] 
 22007-3-21 17:37:29 org.apache.catalina.core.StandardContext filterStart 
 3涓ラ噸: Exception starting filter struts2 
 4Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/C:/Program%20Files/tomcat5.5.23/webapps/Hello/WEB-INF/lib/struts2-spring-plugin-2.0.6.jar!/struts-plugin.xml:8:132 
 5at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:209
 6at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101
 7.. 
 8Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware 
 9at java.lang.ClassLoader.defineClass1(Native Method) 
10at java.lang.ClassLoader.defineClass(ClassLoader.java:620
11 
122007-3-21 17:37:30 org.apache.catalina.core.StandardContext start 
13涓ラ噸: Error filterStart 
142007-3-21 17:37:30 org.apache.catalina.core.StandardContext start 
15涓ラ噸: Context [/Hello] startup failed due to previous errors 
162007-3-21 17:37:30 com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory 
17
          瑙e喅鐨勫姙娉曟槸錛氭垜浠紑濮嬪彧闇瀵煎叆涓婇潰鎻愬埌鐨勪簲涓寘鍒欏彲錛屽悗闈㈠湪瀹為檯鐨勯」鐩腑濡傛灉瑕佺敤鍒板埆鐨勫寘鏃跺啀鍔犲叆錛屽茍鍦ㄩ厤緗笂鍋氱浉搴旂殑璋冩暣銆?br />         

]]>
主站蜘蛛池模板: 国产精品亚洲精品日韩已满| 日韩在线视频免费| 亚洲综合色婷婷七月丁香| 麻豆国产精品免费视频| 999zyz**站免费毛片| 特级毛片aaaa级毛片免费| 亚洲日日做天天做日日谢| 亚洲网址在线观看你懂的| a级亚洲片精品久久久久久久| 日韩免费视频在线观看| 美女裸身网站免费看免费网站| 免费无码H肉动漫在线观看麻豆| 美女免费视频一区二区三区| 亚洲精品久久无码| 亚洲国产日产无码精品| 亚洲AV电影院在线观看| 久久亚洲中文字幕精品一区四| 免费国产一级特黄久久| 免费羞羞视频网站| 久久综合AV免费观看| 久久国产免费福利永久| 中文字幕成人免费视频| 日韩精品无码一区二区三区免费 | 久久久久久久99精品免费| 大片免费观看92在线视频线视频| 国产尤物在线视精品在亚洲| 亚洲欧美日韩综合久久久| 亚洲人成www在线播放| 91丁香亚洲综合社区| 亚洲乱码卡一卡二卡三| 亚洲伊人久久大香线蕉| 亚洲不卡中文字幕| 国产精品亚洲精品青青青| 亚洲卡一卡二卡乱码新区| 色婷五月综激情亚洲综合| 亚洲人成电影网站久久| 亚洲欧美日韩中文二区| 亚洲爆乳精品无码一区二区| 亚洲av无码一区二区三区人妖| 国产青草亚洲香蕉精品久久| 国产亚洲情侣久久精品|