getParameter和getAttribute的区别

    xiaoxiao2021-03-25  65

    getParameter 是用来接受用post或get方法传递过来的参数的.

    getAttribute 必须先setAttribute.

    当两个Web组件之间为链接关系时,被链接的组件通过getParameter()方法来获得请求参数,

    当两个Web组件之间为转发关系时,转发目标组件通过getAttribute()方法来和转发源组件共享request范围内的数据。

    转载请注明原文地址: https://ju.6miu.com/read-35752.html

    最新回复(0)