Get the value from the session

1. Get the value in the session from the front-end jsp page

        ${sessionScope.content}, the content here refers to the content stored in the background session,

For example: the value stored in the background session is uname (the logged-in user name), which is written in the jsp page:

       ${sessionScope.uname}

Second, the value in the session is taken out in the background

       String uname = (String)request.getSession().getAttribute("uname");

The meaning of this code is to retrieve the value stored in the session in the background

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326617402&siteId=291194637
Recommended