title: On Session Timeout Login.gsp is rendered within the <body> tag instead of redirecting to a new gsp page
body: <p>I am new to Grails and working on a project which has just 2 controllers one is for login and the other is for a explorer (similar to a windows explorer with left panel displaying a tree -like structure and the right displays the folders contents as a table)</p>
  
  <p>The application is working as excpected meaning when user accesses the application it displays Login Screen if user hasn't logged in  and if he has logged in it displays the explorer screen.</p>
  
  <p>But this is not the case on session Timeout: suppose the session has timed out and the user clicks on a link in the right panel of the explorer screen then the login screen is displayed within the right panel.</p>
  
  <p>I am using SecurityFilter to redirect to login screen.</p>
  
  <p>SecurityFilters.groovy</p>
  
  <p>def filters = {</p>
  
  <pre><code>    loginCheck(controller:'*', action:'*') {
          before = {
      if (!session.idpuser &amp;&amp; actionName != "login") {
                  redirect(controller: "user", action: "login")                   
                  return false 
              }
          }
      }
  }
  </code></pre>
  
  <p>userController.groovy</p>
  
  <p>def login () {</p>
  
  <pre><code>if (request.get) {        
    return false
  }
  ......  
   redirect(controller: "explorer", action: "file")
  </code></pre>
  
  <p>}</p>
  
  <p>explorerController.groovy</p>
  
  <p>def generateFiles = {</p>
  
  <pre><code>.....
  render(template: 'list', model: [ dirList: dirList])
  </code></pre>
  
  <p>}</p>
  
  <p>UrlMappings.groovy</p>
  
  <p>static mappings = {</p>
  
  <pre><code>    "/$controller/$action?/$id?"{
          constraints {
              // apply constraints here
          }
      }
  
      "/"(action:"file", controller: "explorer")  
      "500"(view:'/error')
  }
  </code></pre>
  
  <p>The reason I think login.gsp is being rendered in the right panel is because when a user click on a link in right panel "generateFiles" action is invoked and that is rendering  login.gsp as a template within explorer.gsp. But I dont know how to fix it :(</p>
  
  <p>I would appreciate if someone can help me with this issue. 
  PLEASE HELP!!!!!    </p>