Is this are same or different pageContext Scope and some of Implicit objects things in JSP Page?

前端 未结 2 1304
耶瑟儿~
耶瑟儿~ 2021-02-03 11:33

This things are same or different if different then please give me reason for that and How?

this things are in scriplet..

1) pageContext.setAttribute(\"first\"

2条回答
  •  眼角桃花
    2021-02-03 12:17

    all three are basically same just different way of setting variable in respective scopes.
    check this article. It states that third parameter for setAttribute method defines the scope in which variable need to set.

    So in your case first will set value in request scope, second will set it in session and third will set it in application scope.

提交回复
热议问题