web组件之间参数传递有3种方式:
(1)request.getParameter("name");
a、通过超链接
b、通过表单
c、通过servlet转发或重定向
d、通过隐藏域完成
(2)pageContext.getAttribute("key"); //页面范围
只能在本页面的脚本中获得
request.getAttribute("key"); //请求转发范围
只能通过来转发请求
session.getAttribute("key"); //浏览器范围
//直接在任何jsp或这servlet中通过session来获取
application.getAttribute("key"); //容器范围
//直接在任何jsp或这servlet中通过application或者servletContext来获取
(3)Cookie