request.setAttribute("agentNo", p); // p is placed in the request scope
request.getSession().setAttribute("agentNo", p); // p is placed in the session scope.
Regarding the scope of request and the scope of session, including application and pageContext, please find out more about it on Baidu.
request.setAttribute("agentNo", p); // p is placed in the request scope
request.getSession().setAttribute("agentNo", p); // p is placed in the session scope.
Regarding the scope of request and the scope of session, including application and pageContext, please find out more about it on Baidu.