/// for example in your controller you write : session.user = "wysmedia" ;
/// you can retrive the value on grails service using this following way.
import javax.servlet.http.HttpSession
import org.springframework.web.context.request.RequestContextHolder
class SessionStorageService {
static transactional = false
static scope = "singleton"
def setUser(User user) {
getSession().user = user
}
def getUser() {
getSession().user
}
private HttpSession getSession() {
return RequestContextHolder.currentRequestAttributes().getSession()
}
}