简体   繁体   中英

Spring MVC Setting variable in session

I am using Spring framework. I want to set username in session, and want to display that user name in every jsp page. What can I achieve this in any way....

you might want to check out the WebUtils setSessionAttribute method:

http://static.springsource.org/spring/docs/1.2.x/api/org/springframework/web/util/WebUtils.html#setSessionAttribute(javax.servlet.http.HttpServletRequest , java.lang.String, java.lang.Object)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM