锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲av永久无码精品三区在线4 ,亚洲欧洲日本在线观看,亚洲国产精品白丝在线观看http://www.tkk7.com/liuzheng/category/24700.htmlzh-cnThu, 06 Sep 2007 17:42:04 GMTThu, 06 Sep 2007 17:42:04 GMT60Struts鏍稿績綾葷悊瑙?/title><link>http://www.tkk7.com/liuzheng/articles/142858.html</link><dc:creator>鍒橀摦 </dc:creator><author>鍒橀摦 </author><pubDate>Wed, 05 Sep 2007 04:01:00 GMT</pubDate><guid>http://www.tkk7.com/liuzheng/articles/142858.html</guid><wfw:comment>http://www.tkk7.com/liuzheng/comments/142858.html</wfw:comment><comments>http://www.tkk7.com/liuzheng/articles/142858.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/liuzheng/comments/commentRss/142858.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/liuzheng/services/trackbacks/142858.html</trackback:ping><description><![CDATA[  <p class="MsoNormal"><span lang="EN-US" style="font-size: 14pt">Struts</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鏍稿績綾伙細</span><span style="font-size: 14pt"> <span lang="EN-US">ActionServlet,RequestProcessor<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-left: 21pt; text-indent: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><span lang="EN-US" style="font-size: 14pt; mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore">1.<span style="font: 7pt 'Times New Roman'">       </span></span></span><span lang="EN-US" style="font-size: 14pt">ActionServlet</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">璐熻矗</span><span lang="EN-US" style="font-size: 14pt">Struts</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鏋舵瀯鐨勬暣涓垵濮嬪寲宸ヤ綔錛屽綋</span><span lang="EN-US" style="font-size: 14pt">ActionServlet</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">瀹炰緥鎺ュ彈鍒?/span><span lang="EN-US" style="font-size: 14pt">HTTP</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">璇鋒眰鏃訛紝鍦?/span><span lang="EN-US" style="font-size: 14pt">doGet()</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鍜?/span><span lang="EN-US" style="font-size: 14pt">doPost()</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鏂規硶涓兘浼氳皟鐢?/span><span lang="EN-US" style="font-size: 14pt">process()</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鏂規硶錛?/span><span lang="EN-US" style="font-size: 14pt">Process()</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">涓張浼氳皟鐢?/span><span lang="EN-US" style="font-size: 14pt">RequestProcessor</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鐨?/span><span lang="EN-US" style="font-size: 14pt">process()</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鏂規硶銆?/span><span lang="EN-US" style="font-size: 14pt"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 21pt; text-indent: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><span lang="EN-US" style="font-size: 14pt; mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore">2.<span style="font: 7pt 'Times New Roman'">       </span></span></span><span lang="EN-US" style="font-size: 14pt">RequestProcessor</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">涓殑</span><span lang="EN-US" style="font-size: 14pt">processActionPerform()</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">璋冪敤</span><span lang="EN-US" style="font-size: 14pt">action</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鐨?/span><span lang="EN-US" style="font-size: 14pt">execute()</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鏂規硶銆?/span><span lang="EN-US" style="font-size: 14pt">RequestProcessor</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鍙互鏍規嵁闇瑕佽繘琛屾墿灞曪紝濡?/span><span lang="EN-US" style="font-size: 14pt">Spring</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">涓殑</span><span lang="EN-US" style="font-size: 14pt">org.springframework.web.struts.DelegatingRequestProcessor</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">銆傛墿灞曞悗蹇呴』鍦?/span><span lang="EN-US" style="font-size: 14pt">Struts</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">鐨?/span><span lang="EN-US" style="font-size: 14pt">Config</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">涓姞鍏?/span><span lang="EN-US" style="font-size: 14pt"><controller processorClass=<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 21pt"><span lang="EN-US" style="font-size: 14pt">"</span><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">錛革幾錛革幾錛革幾</span><span lang="EN-US" style="font-size: 14pt">"/><o:p></o:p></span></p> <img src ="http://www.tkk7.com/liuzheng/aggbug/142858.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/liuzheng/" target="_blank">鍒橀摦 </a> 2007-09-05 12:01 <a href="http://www.tkk7.com/liuzheng/articles/142858.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍩轟簬Struts鐨凙JAX http://www.tkk7.com/liuzheng/articles/136445.html鍒橀摦 鍒橀摦 Mon, 13 Aug 2007 09:24:00 GMThttp://www.tkk7.com/liuzheng/articles/136445.htmlhttp://www.tkk7.com/liuzheng/comments/136445.htmlhttp://www.tkk7.com/liuzheng/articles/136445.html#Feedback0http://www.tkk7.com/liuzheng/comments/commentRss/136445.htmlhttp://www.tkk7.com/liuzheng/services/trackbacks/136445.html棣栧厛錛屾垜浠粛鐒舵槸瀵筍truts搴旂敤鏉ュ仛閰嶇疆錛屼粛鐒舵槸鍦╯truts-config,xml鏂囦歡閲屽仛閰嶇疆錛屽涓嬶細

 <action type="com.ajax.CheckAction"
   銆銆scope="request" path="/ajax/check">
   銆銆<forward name="success" path="/check.jsp"/>
 </action>


璺熸櫘閫氱殑Struts搴旂敤鐨勯厤緗竴鏍鳳紝鍙槸娌℃湁ActionForm鐨勯厤緗?/font>涓嬮潰鏄疉ction綾伙細

 package com.ajax;
 
 import java.io.PrintWriter;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.DynaActionForm;
 
 /**
  * @author Administrator
  *
  * TODO To change the template for this generated type comment go to
  * Window - Preferences - Java - Code Style - Code Templates
  */
 public class CheckAction extends Action
 {
  public final ActionForward execute(ActionMapping mapping, ActionForm form,
         銆銆HttpServletRequest request,
         銆銆HttpServletResponse response)
   throws Exception
   {
銆銆System.out.println("haha...............................");
銆銆String username= request.getParameter("username");
銆銆System.out.println(username);
銆銆String retn;
銆銆if("educhina".equals(username)) retn = "Can't use the same name with the old use,pls select a difference...";
銆銆else retn = "congraducation!you can use this name....";
銆銆PrintWriter out=response.getWriter();
         銆銆out.write(retn);
         銆銆out.close();
銆銆return mapping.findForward("success");
   }
  public static void main(String[] args)
  {
  }
 }

鎴戜滑鍙互鐪嬪埌閲岄潰鐨勯昏緫璺熶笂渚嬩腑Servlet閲岀殑閫昏緫涓鏍楓傛渶鍚庯紝鎴戜滑鏉ョ湅鐪婮SP:

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
 <title>Check.html</title>
 
 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 <meta http-equiv="description" content="this is my page">
 
 <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
 
 </head>
 <script type="text/javascript">
  var http_request = false;
  function send_request(url) {//鍒濆鍖栥佹寚瀹氬鐞嗗嚱鏁般佸彂閫佽姹傜殑鍑芥暟
   http_request = false;
  
file://寮濮嬪垵濮嬪寲XMLHttpRequest瀵硅薄
   if(window.XMLHttpRequest) {
file://Mozilla 嫻忚鍣?br>銆銆http_request = new XMLHttpRequest();
銆銆if (http_request.overrideMimeType) {//璁劇疆MiME綾誨埆
 銆銆http_request.overrideMimeType('text/xml');
銆銆}
   }
   else if (window.ActiveXObject) { // IE嫻忚鍣?br>銆銆try {
 銆銆http_request = new ActiveXObject("Msxml2.XMLHTTP");
銆銆} catch (e) {
 銆銆try {
  銆銆http_request = new ActiveXObject("Microsoft.XMLHTTP");
 銆銆} catch (e) {}
銆銆}
   }
   if (!http_request) { // 寮傚父錛屽垱寤哄璞″疄渚嬪け璐?br>銆銆window.alert("涓嶈兘鍒涘緩XMLHttpRequest瀵硅薄瀹炰緥.");
銆銆return false;
   }
   http_request.onreadystatechange = processRequest;
   // 紜畾鍙戦佽姹傜殑鏂瑰紡鍜孶RL浠ュ強鏄惁鍚屾鎵ц涓嬫浠g爜
   http_request.open("GET", url, true);
   http_request.send(null);
  }
  // 澶勭悊榪斿洖淇℃伅鐨勫嚱鏁?br> 銆銆function processRequest() {
     銆銆if (http_request.readyState == 4) { // 鍒ゆ柇瀵硅薄鐘舵?br>         銆銆if (http_request.status == 200) { // 淇℃伅宸茬粡鎴愬姛榪斿洖錛屽紑濮嬪鐞嗕俊鎭?br>             銆銆alert(http_request.responseText);
         銆銆} else {
file://欏?/u>闈笉姝e父
             銆銆alert("鎮ㄦ墍璇鋒眰鐨勯〉闈㈡湁寮傚父銆?);
         銆銆}
     銆銆}
 銆銆}
  function userCheck() {
   var f = document.forms[0];
   var username = f.username.value;
   if(username=="") {
銆銆window.alert("The user name can not be null!");
銆銆f.username.focus();
銆銆return false;
   }
   else {
銆銆send_request('ajax/check.do?username='+username);
   }
  }
 
 </script>
 <body>
  <form name="form1" action="" method="post">
 User Name:<input type="text" name="username" value="">&nbsp;
 <input type="button" name="check" value="check" onClick="userCheck()">
 <input type="submit" name="submit" value="/oblog312/submit">
 </form>
 </body>
 </html>

鎴戜滑鍙互鐪嬪埌錛孞SP鍩烘湰鏄竴鏍風殑錛岄櫎浜嗚鍙戦佺殑url錛歛jax/check.do?username="+username銆?nbsp;



]]>
主站蜘蛛池模板: 国产在线观看免费视频播放器 | 亚洲女人被黑人巨大进入| 国产福利在线观看永久免费| 亚洲狠狠婷婷综合久久久久| jjizz全部免费看片| 国产精品亚洲综合网站| 亚洲av最新在线网址| 成年女人午夜毛片免费看| 国产成人1024精品免费| 亚洲人成片在线观看| 国产成A人亚洲精V品无码| 91视频国产免费| 亚洲精品国产日韩无码AV永久免费网 | 免费看一级一级人妻片| 亚洲精品网站在线观看你懂的| 日韩一品在线播放视频一品免费| 国产婷婷成人久久Av免费高清 | 久香草视频在线观看免费| 一级特级aaaa毛片免费观看| 四虎成人精品一区二区免费网站| 久久亚洲AV成人无码国产| 国产免费久久精品99久久| 亚洲一区二区三区免费| 日韩在线观看免费完整版视频| 亚洲成a人一区二区三区| 男人j进女人p免费视频| 亚洲乱码中文字幕手机在线| 一级特黄a大片免费| 亚洲va无码va在线va天堂| 亚洲一区在线免费观看| 精品亚洲福利一区二区| 亚洲国产精品VA在线看黑人| 国色精品卡一卡2卡3卡4卡免费| 亚洲日韩国产AV无码无码精品| 国产小视频免费观看| 中文字幕免费不卡二区| 亚洲午夜电影在线观看| 国产亚洲福利一区二区免费看| 久久国产美女免费观看精品| 亚洲美女视频网址| 国产福利免费在线观看|