How to get HttpSession from sessionId in grails application
问题 I have grails application, using sessionRegistry I can get sessionId. Now, how can I get HttpSession from that sessionId. 回答1: If you want the HttpSession then how about this: import org.springframework.beans.BeansException import org.springframework.context.ApplicationContext import org.springframework.context.ApplicationContextAware import org.springframework.stereotype.Component import org.springframework.web.context.WebApplicationContext import javax.servlet.http.HttpSession import javax