I'm using Grails 3.3.10 and trying to map "/" to a controller action, where the user is redirected after a successful login.
In UrlMappings I have:
class UrlMappings {
static mappings = {
"/"(controller:'app')
...
...
When the user signs in, the app is redirected to the root http://localhost:8090/, but it shows a generated view from Grails:
Welcome to Grails
Congratulations, you have successfully started your first Grails
application! At the moment this is the default page, feel free to
modify it to either redirect to a controller or display whatever
content you may choose. Below is a list of controllers that are
currently deployed in this application, click on each to execute
its default action:
Available Controllers:
....
I deleted the default index.gsp and the main.gsp layout, but that view with the controllers is still appearing and I can't get my action to be executed.
If I remove the UrlMapping "/"(controller:'app'), the action is executed OK and the view is the correct one, but the URL is http://localhost:8090/app/index
Is it possible to display the view from app/index being the URL mapped to "/"?
"/"
with"/"(view:"/index")
? – Jeff Scott Brown