您现在的位置: 潮州吧 >> 教程 >> AJAX >> 正文

AJAX实践之与服务器通信

[ 来源:不详 | 作者:佚名 | 时间:2008-1-4 19:09:51| 收藏本文 | 点击:载入次数... ]
dleName = request.getParameter( " middleName " );

String birthday = request.getParameter( " birthday " );

// Create the response text

String responseText = " Hello " + firstName + " " + middleName

+ " . Your birthday is " + birthday + " . "

+ " [Method: " + method + " ] " ;

// Write the response back to the browser

PrintWriter out = response.getWriter();

out.println(responseText);

// Close the writer

out.close();

 }

 protected void doGet(HttpServletRequest request,

HttpServletResponse response)

throws ServletException, IOException {

// Process the request in method processRequest

processRequest(request, response, " GET " );

 }

 protected void doPost(HttpServletRequest request,

HttpServletResponse response)

throws ServletException, IOException {

// Process the request in method processRequest

p

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 


网友评论:
发表您对AJAX实践之与服务器通信的评论
姓 名: *
性 别:
E-mail:
评 分: 1分 2分 3分 4分 5分
评论内容:
·用户发表意见仅代表其个人意见,并且承担一切因发表内容引起的纠纷和责任
·本站管理人员有权在不通知用户的情况下删除不符合规定的评论信息或留做证据
·请客观的评价您所看到的教程,提倡就事论事,杜绝漫骂和人身攻击等不文明行为