Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8425429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:16:05+00:00 2026-06-10T04:16:05+00:00

I am new to Grails and working on a project which has just 2

  • 0

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)

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.

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.

I am using SecurityFilter to redirect to login screen.

SecurityFilters.groovy

def filters = {

    loginCheck(controller:'*', action:'*') {
        before = {
    if (!session.idpuser && actionName != "login") {
                redirect(controller: "user", action: "login")                   
                return false 
            }
        }
    }
}

userController.groovy

def login () {

if (request.get) {        
  return false
}
......  
 redirect(controller: "explorer", action: "file")

}

explorerController.groovy

def generateFiles = {

.....
render(template: 'list', model: [ dirList: dirList])

}

UrlMappings.groovy

static mappings = {

    "/$controller/$action?/$id?"{
        constraints {
            // apply constraints here
        }
    }

    "/"(action:"file", controller: "explorer")  
    "500"(view:'/error')
}

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 🙁

I would appreciate if someone can help me with this issue.
PLEASE HELP!!!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:16:07+00:00Added an answer on June 10, 2026 at 4:16 am

    Since this is an ajax based site, you need to explicitly handle the “you need to login” response in your ajax response handlers and force the user to the login page if needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are working on a new project with Grails 2.0.1 and Spring Security. The
I have a project which uses groovy 1.7.5 and grails 1.3.4. but my new
I'm new to Grails and working on my little project. What I have problem
I just added a registration functionality to my new grails project. For testing it,
I am working in a previously existing grails project that has some search functionality
I am very new to grails.I am doing one sample project for image uploading
In Grails, one can 'bindData' in controller: Book b = new Book() bindData(b, params)
I am working on a Grails project, its an accounting project. We have multiple
I'm working on a Grails project and I want to write some data from
On my fresh new grails project, I installed shiro ( grails install-plugin shiro )

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.