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...
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 :- ...
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...
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...
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...