문제

how to get session map object in View GSP ? i want to not use action to send session in model .

i know that the class path of session is the following :

 org.codehaus.groovy.grails.web.servlet.mvc.GrailsHttpSession

But how can i retrieve it in GSP view.

도움이 되었습니까?

해결책

You can access HttpSession directly using session variable in gsp, it is bound in view layer.

For example:

//gsp
<p>${session}</p>
<p>${session.properties}</p>
<p>${session.id}</p>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top