ikvenu2000
ikvenu2000

Reputation: 341

Grails plugin controller not called from Grails application

I created a Grails plugin "UserSecurity" and a controller "UserSecurityController" with index action and index.gsp page in /views/UserSecurity folder. I run the plugin and everthing works fine. Then using below commands i created zip and then moved to local maven cache to use in other application.

grails package-plugin UserSecurity
grails maven-install

Now, i created a Grails application "UserApplication". Then created a controller "DefaultController" with index as action.

def index() {       
    redirect plugin:"user-security-plugin", controller:"Default", view:"index"
}

But the redirection is not working. When i run list-plugins it will list the UserSecurity plugin also.

Any idea how to resolve this problem.

Upvotes: 0

Views: 349

Answers (1)

user800014
user800014

Reputation:

The plugin option of redirect is the camel case name, try:

redirect plugin:"userSecurity", controller:"default", view:"index"

Note also that the same rule is applied to the controller, so you need to start with lowercase.

Upvotes: 1

Related Questions