锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
欏圭洰鍋氫簡涓孌墊椂闂翠簡錛岃鍋氱殑閮藉仛浜嗭紝鍙互浼戞暣鍑犲ぉ浜嗐傚埄鐢ㄨ繖鍑犲ぉ錛岀湅浜嗙湅鑷繁鍋氱殑欏圭洰錛屽彂鐜頒竴涓棶棰橈紝浠庡ご鍒板熬閮芥病鏈夌敤 actionForm銆傚懙鍛點?br>
鍘熷洜浜嗕篃鏄洜涓轟互鍓嶄竴涓粠緗戜笂鏌ュ埌鐨勮澶у閮藉緢澶寸柤鐨勭粡鍏哥殑闂錛屽氨鏄痵truts 鐨?actionForm 鎵ц validate 榪斿洖鍘熸潵欏甸潰鍚庡師鏉ョ殑鍊兼棤娉曚繚瀛樼殑闂銆備粖澶╁啓浜嗕釜嫻嬭瘯璇曚簡涓涓嬶紝鍙戠幇 struts 騫舵病鏈夊彉浠涔堥瓟鏈備竴鍒囬兘鏄繖涔堝鏄擄紝榪欎釜闂鏍規湰涓嶆槸 struts 鐨勯棶棰樹簡銆?br>
鍏抽敭鐨勫湴鏂瑰湪浜庯紝 欏甸潰鎻愪氦鍚?struts 浼氬皢琛ㄥ崟鐨勫煎~榪?actionForm錛岀劧鍚庢墽琛?validate 鏂規硶錛屼笉閫氳繃灝辮繑鍥炴簮欏甸潰銆?榪欐椂 琛ㄥ崟瀵硅薄鏄瓨鏀懼湪 request 瀵硅薄閲岀殑錛屼笌鎴戜滑騫蟲椂鐢ㄧ殑 request.setAttribute("xx")娌℃湁浠諱綍鍖哄埆錛岃繑鍥炲師欏甸潰鍚庤繖涓璞″綋鐒惰繕鍦?錛屾墍浠ラ〉闈㈠彲浠ョ敤 request.getAttribute("xx") 錛?#8220;xx”鏄痵truts action 鏄犲皠鏃剁殑 name錛屽鏋滈厤浜?attribute 灝辨槸 attribute浜嗭級錛?寰楀埌涔嬪墠濉啓鐨勫箋?br>
鎴戜滑鐨勫伐紼嬬敤 velocity 錛屾洿瀹規槗浜嗭紝鐩存帴 $xx.fieldname ,鎼炲畾銆?br>鎵浠ワ紝浠ュ悗榪樻槸榪欐牱鐢ㄥ惂銆?br>
]]>