• Android 开发服务类 04_ServletForPOSTMethod


    ServletForPOSTMethod 业务类

     1 package com.wangjialin.internet.servlet;
     2 
     3 import java.io.IOException;
     4 import javax.servlet.ServletException;
     5 import javax.servlet.annotation.WebServlet;
     6 import javax.servlet.http.HttpServlet;
     7 import javax.servlet.http.HttpServletRequest;
     8 import javax.servlet.http.HttpServletResponse;
     9 
    10 @WebServlet("/ServletForPOSTMethod")
    11 public class ServletForPOSTMethod extends HttpServlet {
    12     
    13     private static final long serialVersionUID = 1L;
    14          
    15     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    16         // TODO Auto-generated method stub
    17     }
    18 
    19     protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    20         
    21         String name = request.getParameter("name");
    22         String age = request.getParameter("age");
    23         System.out.println("name from POST method: " + name );
    24         System.out.println("age from POST method: " + age );
    25     }
    26 
    27 }
  • 相关阅读:
    Navigator对象
    Location对象
    History 对象
    计时器用法
    window对象
    某班的成绩出来了,现在老师要把班级的成绩打印出来,和 显示当前时间
    牛客练习赛14A(唯一分解定理)
    贪心法(举例子强行凑规律)
    线性筛(欧拉筛法)
    欧拉函数
  • 原文地址:https://www.cnblogs.com/renzimu/p/4540836.html
Copyright © 2020-2023  润新知