锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲无砖砖区免费,亚洲综合激情九月婷婷,久久激情亚洲精品无码?Vhttp://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;



]]>
主站蜘蛛池模板: 亚洲精品视频免费| 国产无遮挡色视频免费视频| 国产成人A亚洲精V品无码 | 亚洲AV伊人久久青青草原| 久久久久se色偷偷亚洲精品av| 日本免费xxxx色视频| 亚洲一区二区影院| 91禁漫免费进入| 亚洲免费闲人蜜桃| 一二三四视频在线观看中文版免费 | 最近免费中文字幕大全免费版视频| 亚洲不卡中文字幕无码| 日韩免费电影网站| 亚洲av无码国产综合专区| 免费看的成人yellow视频| 久久亚洲色WWW成人欧美| 日批日出水久久亚洲精品tv| 精品免费久久久久国产一区| 亚洲AV无码久久精品蜜桃| 97青青草原国产免费观看| 亚洲三级中文字幕| 国产在线观看免费视频播放器| 精品多毛少妇人妻AV免费久久| 一本色道久久综合亚洲精品高清| 大地资源在线资源免费观看 | 水蜜桃视频在线观看免费| 亚洲片一区二区三区| 99国产精品免费视频观看| 亚洲永久在线观看| 亚洲AV中文无码乱人伦在线视色| a级毛片免费在线观看| 亚洲欧洲国产经精品香蕉网| 国产无遮挡裸体免费视频| 四虎国产精品免费永久在线| www.亚洲成在线| 亚洲Av无码乱码在线观看性色| 日韩电影免费观看| 亚洲av永久无码天堂网| 亚洲熟妇无码八AV在线播放| 免费阿v网站在线观看g| 无码人妻一区二区三区免费视频|