Grails 5.1.3 Could not resolve view with name 'list' in servlet with name 'grailsDispatcherServlet' with scaffold
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
After working on upgrading to Grails 5, the scaffold setup doesn't seem to be working with the error Could not resolve view with name 'list' in servlet with name 'grailsDispatcherServlet'
GSP file
```
```
Controller
```
class AuthorisedUserController {
static allowedMethods = [save: "POST", update: "POST", delete: "POST"]
def scaffold = AuthorisedUser
/**
* Method to display list of Authorized users.
* @param max
* @return
*/
def list(Integer max) {
params.max = Math.min(max ?: 10, 100)
[authorisedUserInstanceList: AuthorisedUser.findAllByInactive(false,params), authorisedUserInstanceTotal: AuthorisedUser.count()]
}
}
```
Domain
```
class AuthorisedUser {
String name
Boolean inactive = Boolean.FALSE
static constraints = {
name (blank:false , nullable: false)
inactive(blank:true, nullable: true)
}
}
```
I have tried changing the version of scaffold, changing from list to show, and researching Scaffolding in Grails to see if there is some syntax missing or if any similar issues. I don't see the errors on the screen like I was expecting until I edited the error.gsp to change how it would get the message, otherwise it was a blank page. Expecting to see the list of authorized users.
Contributor guide
Research direction
Start by reproducing the scaffolded AuthorisedUserController list action and follow the GSP link to the list view; inspect error.gsp for the current failure output. Confirm whether the expected list view is present and reached, and consider the issue done when the list of authorised users renders without the view-resolution error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100