How to use session in JSP pages to get information?

前端 未结 7 2131
北恋
北恋 2020-11-27 03:14

I have a JSP page used for editing some user\'s info. When a user logins to the website, I keep the information in the session, then in my edit page I try the following:

相关标签:
7条回答
  • 2020-11-27 03:44

    You can directly use (String)session.getAttribute("username"); inside scriptlet tag ie <% %>.

    0 讨论(0)
提交回复
热议问题