Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails get Session and Management in GSP view

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.

like image 920
Abdennour TOUMI Avatar asked Aug 21 '13 16:08

Abdennour TOUMI


1 Answers

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>
like image 183
dmahapatro Avatar answered Oct 23 '22 13:10

dmahapatro