锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲中文字幕无码久久2020,亚洲精品国产第一综合99久久,亚洲高清在线mvhttp://m.tkk7.com/Good-Game/category/23013.htmlzh-cnTue, 22 Apr 2008 07:29:34 GMTTue, 22 Apr 2008 07:29:34 GMT60struct 2 apps 瀛︿範錛?錛?/title><link>http://m.tkk7.com/Good-Game/archive/2008/04/21/194561.html</link><dc:creator>G_G</dc:creator><author>G_G</author><pubDate>Mon, 21 Apr 2008 09:51:00 GMT</pubDate><guid>http://m.tkk7.com/Good-Game/archive/2008/04/21/194561.html</guid><wfw:comment>http://m.tkk7.com/Good-Game/comments/194561.html</wfw:comment><comments>http://m.tkk7.com/Good-Game/archive/2008/04/21/194561.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/Good-Game/comments/commentRss/194561.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/Good-Game/services/trackbacks/194561.html</trackback:ping><description><![CDATA[ <b>struts2-blank-2.0.11.1.war</b> <br /> <br /> <font color="#a52a2a"> <b>web.xml:<br /></b> </font> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"> <!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> <span style="color: rgb(0, 0, 255);"><?</span> <span style="color: rgb(255, 0, 255);">xml聽version="1.0"聽encoding="UTF-8"</span> <span style="color: rgb(0, 0, 255);">?></span> <span style="color: rgb(0, 0, 0);"> <br /> </span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">web-app聽</span> <span style="color: rgb(255, 0, 0);">id</span> <span style="color: rgb(0, 0, 255);">="WebApp_9"</span> <span style="color: rgb(255, 0, 0);">聽version</span> <span style="color: rgb(0, 0, 255);">="2.4"</span> <span style="color: rgb(255, 0, 0);">聽xmlns</span> <span style="color: rgb(0, 0, 255);">="http://java.sun.com/xml/ns/j2ee"</span> <span style="color: rgb(255, 0, 0);">聽xmlns:xsi</span> <span style="color: rgb(0, 0, 255);">="http://www.w3.org/2001/XMLSchema-instance"</span> <span style="color: rgb(255, 0, 0);">聽xsi:schemaLocation</span> <span style="color: rgb(0, 0, 255);">="http://java.sun.com/xml/ns/j2ee聽http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br /> <br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">display-name</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);">Struts聽Blank</span> <span style="color: rgb(0, 0, 255);"></</span> <span style="color: rgb(128, 0, 0);">display-name</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br /> <br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">filter</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽聽聽聽聽聽</span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">filter-name</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);">struts2</span> <span style="color: rgb(0, 0, 255);"></</span> <span style="color: rgb(128, 0, 0);">filter-name</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽聽聽聽聽聽<br /></span> <span style="color: rgb(0, 128, 0);">聽聽聽 <!--</span> <span style="color: rgb(0, 128, 0);">聽struct聽2聽澶勭悊綾宦?</span> <span style="color: rgb(0, 128, 0);">--><br />聽聽聽 <!-- </span> <span style="color: rgb(0, 128, 0);">鐩稿簲闇瑕乯ar: <br />聽聽聽 聽聽聽 聽聽聽 聽聽聽 commons-logging-1.0.4.jar</span> <span style="color: rgb(0, 128, 0);"> <br />聽聽聽 聽聽 聽聽 聽聽 聽聽 freemarker-2.3.8.jar<br />聽聽聽 聽聽 聽聽 聽聽 聽聽 ognl-2.6.11.jar<br />聽聽聽 聽聽聽 聽聽聽 聽聽聽 struts2-core-2.0.11.1.jar<br />聽聽聽 聽聽 聽聽 聽聽 聽聽 xwork-2.0.4.jar<br /> 聽聽聽 --></span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">filter-class</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);">org.apache.struts2.dispatcher.FilterDispatcher</span> <span style="color: rgb(0, 0, 255);"></</span> <span style="color: rgb(128, 0, 0);">filter-class</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> </span> <span style="color: rgb(0, 0, 255);"></</span> <span style="color: rgb(128, 0, 0);">filter</span> <span style="color: rgb(0, 0, 255);">><br /><br /></span> <span style="color: rgb(0, 0, 0);">聽聽聽聽</span> <span style="color: rgb(0, 128, 0);"><!--</span> <span style="color: rgb(0, 128, 0);">聽聽榛樿瑕嗙洊</span> <span style="color: rgb(0, 128, 0);">鍏ㄩ儴</span> <span style="color: rgb(0, 128, 0);">璺緞聽 </span> <span style="color: rgb(0, 128, 0);">--></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">filter-mapping</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽聽聽聽聽聽</span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">filter-name</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);">struts2</span> <span style="color: rgb(0, 0, 255);"></</span> <span style="color: rgb(128, 0, 0);">filter-name</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽聽聽聽聽聽</span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">url-pattern</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);">/*</span> <span style="color: rgb(0, 0, 255);"></</span> <span style="color: rgb(128, 0, 0);">url-pattern</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);"></</span> <span style="color: rgb(128, 0, 0);">filter-mapping</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br /> <br />聽聽聽聽</span> <span style="color: rgb(0, 128, 0);"><!--</span> <span style="color: rgb(0, 128, 0);">聽鍒濆欏甸潰聽</span> <span style="color: rgb(0, 128, 0);">--></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">welcome-file-list</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽聽聽聽聽聽</span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">welcome-file</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);">index.html</span> <span style="color: rgb(0, 0, 255);"></</span> <span style="color: rgb(128, 0, 0);">welcome-file</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);"></</span> <span style="color: rgb(128, 0, 0);">welcome-file-list</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br /> <br /> </span> <span style="color: rgb(0, 0, 255);"></</span> <span style="color: rgb(128, 0, 0);">web-app</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br /> </span> </div> <br /> <font color="#a52a2a"> <b>index.html:</b> </font> <br /> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"> <!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> <span style="color: rgb(0, 0, 0);"> <img src="http://m.tkk7.com/images/dot.gif" /> </span> <span style="color: rgb(0, 0, 255);"> </span> <span style="color: rgb(0, 0, 0);"> <img src="http://m.tkk7.com/images/dot.gif" /> <br /> </span> <span style="color: rgb(0, 0, 255);">聽聽聽 <</span> <span style="color: rgb(128, 0, 0);">head</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 255);"> </span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽 聽聽聽 </span> <span style="color: rgb(0, 128, 0);"><!--</span> <span style="color: rgb(0, 128, 0);">聽鍒╃敤html聽璺寵漿聽</span> <span style="color: rgb(0, 128, 0);">--></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽 聽聽聽 </span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">META聽</span> <span style="color: rgb(255, 0, 0);">HTTP-EQUIV</span> <span style="color: rgb(0, 0, 255);">="Refresh"</span> <span style="color: rgb(255, 0, 0);">聽CONTENT</span> <span style="color: rgb(0, 0, 255);">="0;URL=example/HelloWorld.action"</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br /> </span> <span style="color: rgb(0, 0, 255);">聽聽聽 </</span> <span style="color: rgb(128, 0, 0);">head</span> <span style="color: rgb(0, 0, 255);">></span> <span style="color: rgb(0, 0, 0);"> <br /> <img src="http://m.tkk7.com/images/dot.gif" /> <img src="http://m.tkk7.com/images/dot.gif" /> </span> </div> <br /> <font color="#a52a2a"> <b>struct.xml</b> </font> <br /> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"> <!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> <span style="color: rgb(0, 0, 0);"> <img src="http://m.tkk7.com/images/dot.gif" /> <img src="http://m.tkk7.com/images/dot.gif" /> <br />聽聽聽</span> <span style="color: rgb(0, 128, 0);"><!--</span> <span style="color: rgb(0, 128, 0);">聽妯″潡鍖栨敞鍏ヂ犅?/span> <span style="color: rgb(0, 128, 0);">--></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽</span> <span style="color: rgb(0, 0, 255);"><</span> <span style="color: rgb(128, 0, 0);">include聽</span> <span style="color: rgb(255, 0, 0);">file</span> <span style="color: rgb(0, 0, 255);">="example.xml"</span> <span style="color: rgb(0, 0, 255);">/></span> <span style="color: rgb(0, 0, 0);"> <br /> <br />聽聽聽聽</span> <span style="color: rgb(0, 128, 0);"><!--</span> <span style="color: rgb(0, 128, 0);">聽Add聽packages聽here聽</span> <span style="color: rgb(0, 128, 0);">--></span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽聽<img src="http://m.tkk7.com/images/dot.gif" /><img src="http://m.tkk7.com/images/dot.gif" /></span> </div> <br /> <br /> <br />example.xml<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 255);"><?</span><span style="color: rgb(255, 0, 255);">xml聽version="1.0"聽encoding="UTF-8"聽</span><span style="color: rgb(0, 0, 255);">?></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);"><!</span><span style="color: rgb(255, 0, 255);">DOCTYPE聽struts聽PUBLIC<br />聽聽聽聽聽聽聽聽"-//Apache聽Software聽Foundation//DTD聽Struts聽Configuration聽2.0//EN"<br />聽聽聽聽聽聽聽聽"http://struts.apache.org/dtds/struts-2.0.dtd"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><br /></span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">struts</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽</span><span style="color: rgb(0, 128, 0);"><!--</span><span style="color: rgb(0, 128, 0);">聽瀹氫箟鍩熺┖闂綽?/span><span style="color: rgb(0, 128, 0);">--></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">package聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="example"</span><span style="color: rgb(255, 0, 0);">聽namespace</span><span style="color: rgb(0, 0, 255);">="/example"</span><span style="color: rgb(255, 0, 0);">聽extends</span><span style="color: rgb(0, 0, 255);">="struts-default"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);"><!--</span><span style="color: rgb(0, 128, 0);">聽鍩熶竴鑸闂?/span><span style="color: rgb(0, 128, 0);">--></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">action聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="HelloWorld"</span><span style="color: rgb(255, 0, 0);">聽class</span><span style="color: rgb(0, 0, 255);">="example.HelloWorld"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">result</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">/example/HelloWorld.jsp</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">result</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">action</span><span style="color: rgb(0, 0, 255);">><br /><font color="#006400"><!--</font></span><font color="#006400">HelloWord.java錛堝浗闄呭寲錛?start --></font><span style="color: rgb(0, 0, 255);"><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><img id="Code_Closed_Image_172816" onclick="this.style.display='none'; Code_Closed_Text_172816.style.display='none'; Code_Open_Image_172816.style.display='inline'; Code_Open_Text_172816.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" height="16" width="11" /><img id="Code_Open_Image_172816" style="display: none;" onclick="this.style.display='none'; Code_Open_Text_172816.style.display='none'; Code_Closed_Image_172816.style.display='inline'; Code_Closed_Text_172816.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" height="16" width="11" /><span id="Code_Closed_Text_172816" style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255);"></span><span id="Code_Open_Text_172816" style="display: none;"><br /><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 128);">聽1</span>聽<span style="color: rgb(0, 0, 255);">package</span><span style="color: rgb(0, 0, 0);">聽example;<br /></span><span style="color: rgb(0, 128, 128);">聽2</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽3</span>聽<span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽4</span>聽<span style="color: rgb(0, 128, 0);">聽*聽import聽com.opensymphony.xwork2.ActionSupport;<br /></span><span style="color: rgb(0, 128, 128);">聽5</span>聽<span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽6</span>聽<span style="color: rgb(0, 128, 0);">public聽class聽ExampleSupport聽extends聽ActionSupport聽{<br /></span><span style="color: rgb(0, 128, 128);">聽7</span>聽<span style="color: rgb(0, 128, 0);">聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽8</span>聽<span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">聽HelloWorld聽</span><span style="color: rgb(0, 0, 255);">extends</span><span style="color: rgb(0, 0, 0);">聽ExampleSupport聽{<br /></span><span style="color: rgb(0, 128, 128);">聽9</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">10</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">榛樿鏂規硶</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">11</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽String聽execute()聽</span><span style="color: rgb(0, 0, 255);">throws</span><span style="color: rgb(0, 0, 0);">聽Exception聽{<br /></span><span style="color: rgb(0, 128, 128);">12</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鍥介檯鍖栨柟娉曚嬌鐢爂etText(聽key聽)<br /></span><span style="color: rgb(0, 128, 128);">13</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">聽鍦╱rl涓綋鐜?>>聽HelloWorld.action?request_locale=en/es<br /></span><span style="color: rgb(0, 128, 128);">14</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鍥介檯鍖栭厤緗枃浠舵枃浠堵爌ackage.properties鍜宲ackage_es.properties</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">15</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽setMessage(getText(MESSAGE));<br /></span><span style="color: rgb(0, 128, 128);">16</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽SUCCESS;<br /></span><span style="color: rgb(0, 128, 128);">17</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">18</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">19</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">20</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽Provide聽default聽valuie聽for聽Message聽property.<br /></span><span style="color: rgb(0, 128, 128);">21</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">22</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);">聽String聽MESSAGE聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">HelloWorld.message</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">23</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">24</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">25</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽Field聽for聽Message聽property.<br /></span><span style="color: rgb(0, 128, 128);">26</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">27</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">聽String聽message;<br /></span><span style="color: rgb(0, 128, 128);">28</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">29</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">30</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽Return聽Message聽property.<br /></span><span style="color: rgb(0, 128, 128);">31</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*<br /></span><span style="color: rgb(0, 128, 128);">32</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);">聽Message聽property<br /></span><span style="color: rgb(0, 128, 128);">33</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">34</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽String聽getMessage()聽{<br /></span><span style="color: rgb(0, 128, 128);">35</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽message;<br /></span><span style="color: rgb(0, 128, 128);">36</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">37</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">38</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">39</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽Set聽Message聽property.<br /></span><span style="color: rgb(0, 128, 128);">40</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*<br /></span><span style="color: rgb(0, 128, 128);">41</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);">聽message聽Text聽to聽display聽on聽HelloWorld聽page.<br /></span><span style="color: rgb(0, 128, 128);">42</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">43</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">聽setMessage(String聽message)聽{<br /></span><span style="color: rgb(0, 128, 128);">44</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">.message聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽message;<br /></span><span style="color: rgb(0, 128, 128);">45</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">46</span>聽<span style="color: rgb(0, 0, 0);">}</span></span></div></span><span style="color: rgb(0, 0, 255);"><font color="#006400"><!--</font></span><font color="#006400">HelloWord.java錛堝浗闄呭寲錛?end--></font><br /><span style="color: rgb(0, 0, 255);"><br /></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);"><!--</span><span style="color: rgb(0, 128, 0);">聽錛堝叧閿細action鍒╃敤姝e垯閫夋嫨鏂規硶錛塋ogin(_*)聽 >method="{1}"聽 </span><span style="color: rgb(0, 128, 0);">--></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">action聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="Login_*"</span><span style="color: rgb(255, 0, 0);">聽method</span><span style="color: rgb(0, 0, 255);">="{1}"</span><span style="color: rgb(255, 0, 0);">聽class</span><span style="color: rgb(0, 0, 255);">="example.Login"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">result聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="input"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">/example/Login.jsp</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">result</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">result聽</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="redirect-action"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">Menu</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">result</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">action</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);"><font color="#006400"><!-</font></span><font color="#006400"><span style="color: rgb(0, 0, 255);"></span></font><font color="#006400">- example.Login錛堥獙璇佹鏋訛級 start --><br />java<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><img id="Code_Closed_Image_174952" onclick="this.style.display='none'; Code_Closed_Text_174952.style.display='none'; Code_Open_Image_174952.style.display='inline'; Code_Open_Text_174952.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" height="16" width="11" /><img id="Code_Open_Image_174952" style="display: none;" onclick="this.style.display='none'; Code_Open_Text_174952.style.display='none'; Code_Closed_Image_174952.style.display='inline'; Code_Closed_Text_174952.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" height="16" width="11" /><span id="Code_Closed_Text_174952" style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255);"></span><span id="Code_Open_Text_174952" style="display: none;"><br /><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 128);">聽1</span>聽<span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">聽Login聽</span><span style="color: rgb(0, 0, 255);">extends</span><span style="color: rgb(0, 0, 0);">聽ExampleSupport聽{<br /></span><span style="color: rgb(0, 128, 128);">聽2</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽3</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽String聽execute()聽</span><span style="color: rgb(0, 0, 255);">throws</span><span style="color: rgb(0, 0, 0);">聽Exception聽{<br /></span><span style="color: rgb(0, 128, 128);">聽4</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽5</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(isInvalid(getUsername()))聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽INPUT;<br /></span><span style="color: rgb(0, 128, 128);">聽6</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽7</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(isInvalid(getPassword()))聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽INPUT;<br /></span><span style="color: rgb(0, 128, 128);">聽8</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽9</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽SUCCESS;<br /></span><span style="color: rgb(0, 128, 128);">10</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">11</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">12</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">boolean</span><span style="color: rgb(0, 0, 0);">聽isInvalid(String聽value)聽{<br /></span><span style="color: rgb(0, 128, 128);">13</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽(value聽</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">||</span><span style="color: rgb(0, 0, 0);">聽value.length()聽</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">14</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽}</span></span></div>Login-validation.xml<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><img id="Code_Closed_Image_175040" onclick="this.style.display='none'; Code_Closed_Text_175040.style.display='none'; Code_Open_Image_175040.style.display='inline'; Code_Open_Text_175040.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" height="16" width="11" /><img id="Code_Open_Image_175040" style="display: none;" onclick="this.style.display='none'; Code_Open_Text_175040.style.display='none'; Code_Closed_Image_175040.style.display='inline'; Code_Closed_Text_175040.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" height="16" width="11" /><span id="Code_Closed_Text_175040" style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255);"></span><span id="Code_Open_Text_175040" style="display: none;"><br /><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 128);">聽1</span>聽<span style="color: rgb(0, 0, 255);"><!</span><span style="color: rgb(255, 0, 255);">DOCTYPE聽validators聽PUBLIC<br /></span><span style="color: rgb(0, 128, 128);">聽2</span>聽<span style="color: rgb(255, 0, 255);">聽聽聽聽聽聽聽聽"-//OpenSymphony聽Group//XWork聽Validator聽1.0.2//EN"<br /></span><span style="color: rgb(0, 128, 128);">聽3</span>聽<span style="color: rgb(255, 0, 255);">聽聽聽聽聽聽聽聽"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽4</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽5</span>聽<span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">validators</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽6</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">field聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="username"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽7</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">field-validator聽</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="requiredstring"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽8</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">message聽</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="requiredstring"</span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽9</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">field-validator</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">10</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">field</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">11</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">field聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="password"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">12</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">field-validator聽</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="requiredstring"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">13</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">message聽</span><span style="color: rgb(255, 0, 0);">key</span><span style="color: rgb(0, 0, 255);">="requiredstring"</span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">14</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">field-validator</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">15</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">field</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">16</span>聽<span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">validators</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">17</span>聽<span style="color: rgb(0, 0, 0);"></span></span></div><br /></font><span style="color: rgb(0, 0, 255);"><font color="#006400"><!-</font></span><font color="#006400"><span style="color: rgb(0, 0, 255);"></span></font><font color="#006400">- example.Login錛堥獙璇佹鏋訛級 end --><br /></font><font color="#006400"><br /><br /></font><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);"><!--</span><span style="color: rgb(0, 128, 0);">聽jsp聽灝佸寘 濡?Missing.action灝辨槸Missiong.jsp </span><span style="color: rgb(0, 128, 0);">--></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">action聽</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="*"</span><span style="color: rgb(255, 0, 0);">聽class</span><span style="color: rgb(0, 0, 255);">="example.ExampleSupport"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">result</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);">/example/{1}.jsp</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">result</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">action</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /><br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);"><!--</span><span style="color: rgb(0, 128, 0);">聽Add聽actions聽here聽</span><span style="color: rgb(0, 128, 0);">--></span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">package</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">struts</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /></span></div><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><img src ="http://m.tkk7.com/Good-Game/aggbug/194561.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/Good-Game/" target="_blank">G_G</a> 2008-04-21 17:51 <a href="http://m.tkk7.com/Good-Game/archive/2008/04/21/194561.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Struts validation 灝忎緥http://m.tkk7.com/Good-Game/archive/2007/08/09/135434.htmlG_GG_GThu, 09 Aug 2007 04:03:00 GMThttp://m.tkk7.com/Good-Game/archive/2007/08/09/135434.htmlhttp://m.tkk7.com/Good-Game/comments/135434.htmlhttp://m.tkk7.com/Good-Game/archive/2007/08/09/135434.html#Feedback0http://m.tkk7.com/Good-Game/comments/commentRss/135434.htmlhttp://m.tkk7.com/Good-Game/services/trackbacks/135434.html 闂錛?/b> 褰揑E 紱佺敤javascript 鎬庝箞楠岃瘉鏁版嵁
瑙e喅錛?/b>Struts validation聽 妗嗘灦

1錛夊厛 寤?Form綾宦犅?font color="#800080"> extendsValidatorForm
聽聽聽
聽聽聽聽private聽String聽name聽;
聽聽聽聽
private聽String聽pass聽;聽聽聽

2) Jsp 寤虹珛
聽聽<body>
聽聽聽聽聽聽
<font聽color="red"><html:errors/></font>
聽聽聽聽
<html:form聽action="/test">
聽聽聽聽聽聽聽聽name:
<html:text聽property="name"/>
聽聽聽聽聽聽聽聽pass:
<html:text聽property="pass"/>
聽聽聽聽聽聽聽聽
<html:submit>submit</html:submit>
聽聽聽聽
</html:form>
聽聽
</body>

3錛塿alidator.xml寤虹珛
<?xml聽version='1.0'?>
<!DOCTYPE聽form-validation聽PUBLIC
聽聽聽聽聽聽聽聽聽聽"-//Apache聽Software聽Foundation//DTD聽Commons聽Validator聽Rules聽Configuration聽1.0//EN"
聽聽聽聽聽聽聽聽聽聽"http://jakarta.apache.org/commons/dtds/validator_1_0.dtd"
>
聽聽聽聽聽聽聽聽聽聽
<form-validation>
聽聽聽聽
<formset>
聽聽聽聽聽聽聽聽
<form聽name="testForm">
聽聽聽聽聽聽聽聽聽聽聽聽
<field聽property="name"聽depends="minlength,maxlength,mask">
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<msg聽name="minlength"聽key="err.minlength"/>聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 <!-- 褰?minlength閿欐椂 msg 嬋媧?-->
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽<msg聽name="maxlength"聽key="err.maxlength"/>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<arg0聽key="${var:maxlength}"聽聽resource="false"/>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<arg1聽key="${var:minlength}"聽resource="false"/>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<var>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<var-name>maxlength</var-name>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<var-value>5</var-value>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
</var>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<var>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<var-name>minlength</var-name>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
<var-value>3</var-value>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
</var>
聽聽聽聽聽聽聽聽聽聽聽聽
</field>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽
</form>
聽聽聽聽
</formset>
</form-validation>

4)ApplicationResources.properties
#聽Resources聽for聽parameter聽'com.validator.struts.ApplicationResources'
#
聽Project聽P/validator
err.minlength=聽err聽min<3
err
.maxlength=聽err聽max>5

蹇冨緱錛?validation聽 榪欐槸涓毦鍟冪殑楠ㄥご 瑕佸澶氱殑鎺ヨЕ



G_G 2007-08-09 12:03 鍙戣〃璇勮
]]>
struts http://m.tkk7.com/Good-Game/archive/2007/04/19/111883.htmlG_GG_GThu, 19 Apr 2007 04:01:00 GMThttp://m.tkk7.com/Good-Game/archive/2007/04/19/111883.htmlhttp://m.tkk7.com/Good-Game/comments/111883.htmlhttp://m.tkk7.com/Good-Game/archive/2007/04/19/111883.html#Feedback1http://m.tkk7.com/Good-Game/comments/commentRss/111883.htmlhttp://m.tkk7.com/Good-Game/services/trackbacks/111883.html鍒濈悊瑙?鍏?鍦?form 涓?瑕佹湁 time 灞炴犲湪榪愯涓?FORM 濉厖 TIME 聽

聽聽聽聽聽聽聽聽 < html:form聽 action ="/tAT.do" >
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
< html:text聽 property ="time" 聽size ="8" 聽readonly ="true" />
聽聽聽聽聽聽聽聽聽聽聽聽
</ html:form >


G_G 2007-04-19 12:01 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 嫩草在线视频www免费看| 国产无遮挡无码视频免费软件 | 国产人成免费视频| JLZZJLZZ亚洲乱熟无码| 亚洲AV无码一区东京热| 亚洲中文无码卡通动漫野外 | 国产成人综合久久精品亚洲| 中文字幕高清免费不卡视频| 亚洲综合精品网站| 久久国产精品免费一区二区三区| 亚洲一区二区三区免费| 久久嫩草影院免费看夜色| 精品国产综合成人亚洲区| 在线成人精品国产区免费| 久久精品国产精品亚洲蜜月| 亚洲精品视频在线观看免费| 67194在线午夜亚洲| 日韩免费视频观看| 九九99热免费最新版| 婷婷精品国产亚洲AV麻豆不片| 国产成人人综合亚洲欧美丁香花| 免费国产成人高清视频网站| 免费人成网站在线观看10分钟| 国产成人麻豆亚洲综合无码精品| 精品多毛少妇人妻AV免费久久| 亚洲综合国产一区二区三区| 亚洲精品免费视频| 亚洲人精品亚洲人成在线| **毛片免费观看久久精品| 亚洲毛片基地4455ww| www.91亚洲| 国产成人亚洲午夜电影| 国产亚洲精品AA片在线观看不加载| 亚洲无码一区二区三区| 亚洲人成电影在线播放| 美女隐私免费视频看| 成人永久免费高清| 在线成人精品国产区免费| 亚洲一卡2卡3卡4卡乱码 在线| 亚洲综合国产精品第一页| 天天影院成人免费观看|