刘圣杰

 

2012年10月16日

request.getParameter和request.getAttribute之间的区别

摘要: HttpServletRequest类既有getAttribute()方法,也由getParameter()方法,这两个方法有以下区别: (1)HttpServletRequest类有setAttribute()方法,而没有setParameter()方法 (2)当两个Web组件之间为链接关系时,被链接的组件通过getParameter()方法来获得请求参数,例如假定welcome.jsp和authenticate.jsp之间为链接关系,welcome.jsp中有以下代码: <a href="authenticate.jsp?username=weiqin">a 阅读全文

posted @ 2012-10-16 08:39 刘圣杰 阅读(5780) 评论(0) 推荐(1) 编辑

导航