package cn.itcast.servlet;
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.itcast.domain.Person;
/**
* 通过 内省实现 jsp:setProperty 相同效果
*
*
*/
public class IntrospectorServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// 将请求参数 ,自动封装 JavaBean对象中
request.setCharacterEncoding("utf-8");
// 封装目标对象
Person person = new Person();
// 请求参数