有setAttribute()方法,没有setParameter()方法。
getAttribute()返回的是Object类型,getParameter()返回的是String类型。
getParameter()方法传递的数据,会从Web客户端传到Web服务器端,代表HTTP请求数据;setAttribute()和getAttribute()方法传递的数据只会存在于Web容器内部,在具有转发关系的Web组件之间共享。即request.getAttribute()方法返回request范围内存在的对象,而request.getParameter()方法是获取http提交过来的数据。
版权声明:本文为CSDN博主「qq997404392」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq997404392/article/details/73920423
原文链接:https://blog.csdn.net/qq997404392/article/details/73920423