import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import myBean.User;

public class UseBeanServlet extends HttpServlet {
	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		User usr = new User();
		usr.setAge(18);
		usr.setName("somebody");
		HttpSession session = request.getSession();
		session.setAttribute("user", usr);

		getServletConfig().getServletContext().getRequestDispatcher("/book/usebean.jsp").forward(request,response);
	}
}