title: Grails application - redirect non-www version to www version of the website
body: <p>Our Grails application is deployed on VPS but the www and non-www versions are
  not the same. There are actually two sites, that is there are two cookies in the browser, one for each version, so the user logged in in non-www version is not logged in in www version.</p>
  
  <p>What is the best way to point non-www version to www version in Grails? We are
  using Tomcat as the application server.</p>
  
  <p>I was thinking to create a Grails filter and change all non-www urls to the same url with www appended and to do a permanent redirect. But I am not sure if this is a good way to do it. We don't have Apache server in front of Tomcat so we can't use it's url rewriting mechanism.</p>
  
  <p>Thank you.</p>