Grails

Restricting concurrent sessions for a single user using Grails and Spring Security

Restricting concurrent sessions for a single user is a very common requirement for any software tool which requires licensing based on number of users. You can read about how we can manage (or allow) concurrent sessions with Grails 2 using Spring security plugin in this awesome concise blog here. let us see how we can allow or...

by Dhanendra Kumar
Tag: HTTP session
04-Dec-2014

Grails

Change user preferred locale using spring’s SessionLocaleResolver

Here we are going to talk about a scenario where there are some records in database which are specific to locale and they need to be displayed as per user's current locale at number of places.Also user can change its preferred locale. For this I preferred to set the user's locale in the session object. There are two ways to do this :- ...

by Nitesh
Tag: HTTP session
11-May-2012

Grails

Sharing HTTP Session between subdomains

Recently, I had a usecase to share same http session between different subdomains. The idea was that if a user is logged in on "somedomain.com", he need not to login again to go to subdomain.somedomain.com. The same http session should be usable. I started off on the wrong foot by looking into the SpringSecurity plugin, which I had been...

by Imran Mir
Tag: HTTP session
21-Mar-2012

Technology

Tomcat 6 Session Persistence through JDBCStore

In one of our recent projects, we needed to save the HTTP session in the database. This blog refers the Apache documentation as found here: http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html These are the following steps that need to be followed: Step 1: Create a database named tomcat (as shown in our example in Step 3...

by Abhishek Tejpaul
Tag: HTTP session
21-Jul-2010

Grails

Accessing Session Map in the Domain or Service Layer

The Session Map is available in Grails in the Views, TagLibs and the Controllers. That is, it can be directly accessed by the name "session". If the Session Map is required to be accessed in the Service Layer or the Domain layer, such a straightforward approach will not work. In this case, a class which is a part of the Spring Framework...

by Vivek Krishna
Tag: HTTP session
16-Jul-2009