smithhan

导航

2016年1月24日 #

web初学之request,session与application

摘要: request (1)request的setAttribute()与getAttribute()方法一般都是成对出现,首先通过setAttribute()方法设置属性与属性值,然后通过getAttribute()方法根据属性获取到与该属性对应的对象值。setAttribute()与getAttrib 阅读全文

posted @ 2016-01-24 22:20 smithhan 阅读(1219) 评论(0) 推荐(1) 编辑

web初学之重定向与请求转发

摘要: 重定向与请求转发的问题 (1)RequestDispatcher是通过调用HttpServletRequest对象的getRequestDispatcher()方法得到的,是属于请求对象的方法。 (2)sendRedirect()是HttpServletResponse对象的方法,即响应对象的方法, 阅读全文

posted @ 2016-01-24 16:32 smithhan 阅读(208) 评论(0) 推荐(0) 编辑