实例应用

index.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>




Insert title here




               

请输入你的名字和生日

名字
生日


request.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% 
         String userName = request.getParameter("userName"); 
         String userBirth = request.getParameter("userBirth"); 
     
         if (request.getMethod().equals("get")||request.getMethod().equals("Get")||request.getMethod().equals("GET")){
             out.println("Get : " +userName + ", your Birth is " +userBirth);
         } else {
             out.println("Post : " +userName + ", your Birth is " +userBirth);
         }
%>


你可能感兴趣的:(实例应用)