I have upgraded my grails app from 1.3.7 to 2.0.1. I had few static (gsp but not using any controllers) pages using standard layout under "grails-app\views\" . These files were working fine prior to upgrade. But after upgrade, I get 404 error. Only index.gsp is working if I give root path ie. "http://localhost:8080/myapp/". But if I specify "http://localhost:8080/myapp/index.gsp", I get 404 error.
I assume this is something to do with grails filters in 2.0.1. But i couldn't figure it out yet. DO anyone have experienced any similar issue?
This was a security risk and directly linking to GSPs was disallowed in 2.0 - see http://jira.grails.org/browse/GRAILS-7542 and http://grails.1312388.n4.nabble.com/Direct-linking-to-gsp-in-Grails-2-0-td4228929.html for a discussion and examples of how to use URL mappings to link to GSPs.
Related
I am migrating a grails app from 2.3.4 to 3.3.9. I created a new app and am bringing in the code piece by piece. I have the "org.grails.plugins:spring-security-core:3.2.3" dependency and "org.grails.plugins:spring-security-ui:3.1.2" because I want the user/role management screens.
From my investigation both plugins include login/auth.gsp, and it seems my app is using ui instead of core, but this is not how my 2.3.4 app behaved using ":spring-security-core:2.0-RC2" and ":spring-security-ui:1.0-RC1". Is there some way to configure or force the app to use login/auth.gsp from core? If not, can I just copy the one I want into my local views folder? Would there be any compatibility issues?
I copied https://github.com/grails-plugins/grails-spring-security-core/blob/3.2.x/grails-app/views/login/auth.gsp into my views folder, and it seems to work fine and give me the results I want. There seem to be no obvious compatibility issues.
I am upgrading my application from Grails version 2.3.7 to version 3.2.2. My JSPs and other content like CSS and images all had to move from the old location of "web-app" to the new location of "src/main/resources/". Now, however, my JSPs will not load like they did before. For instance, my index page has always been http://hostname/app-name/homepage.jsp, and that always loaded just fine in Grails 2.x. Maybe there is just a configuration missing or something, does anyone have a suggestion. I have read the upgrade documentation, but have not found an answer to my problem.
As Grails 3 uses Spring Boot there is no default context. So your application should be served under http://hostname:port.
You can change it back to the previous URL as suggested in How do you change the application name in Grails 3?
We have recently upgraded a project from grails version 2.3.11 to 2.5.5. In the process the webflow plugin was updated from 2.0.8.1 to 2.1.0.
To controll webflow I use the g:link tag, like this:
<g:link event="foo">Foo action</g:link>
Before the update, the link url was correctly build, and looked like this:
/fooaction/superflow?execution=e1s2&_eventId=foo
Since the update, the link is missing the execution parameter, and resolves like this: /fooaction/superflow?_eventId=foo
This can be fixed, by changing the links, like this:
<g:link event="foo" params="${[execution: params.execution]}">Foo action</g:link>
But this can not be a solution. I searched the web and seem to be the only one having this problem. Which indicates I made a mistake in the configuration. Maybe someone can enlighten me, what I could have missed.
I found a link on github, stating This works with <= Grails 2.4.4 but not with Grails >= 2.4.5. The execution param is missing. Is this a bug which have not been fixed ever since?
Thank you very much.
Need of help.
I am new to Grails,
My question is How to do db-reverse-engineer.?
I did it in Grails 2.5.1 but I am struggling with Grails 3.1.0.M2 version.
Thanks in advance.
There's no plugin for Grails 3. I started to convert the older one but it's more work than I was expecting because it has to work with Hibernate 4, and the old plugin only works with Hibernate 3.
But the generated files wouldn't be any different in Grails 3 than in Grails 2 since GORM has stayed rather consistent. Since the plugin is only used at build time, and often only once or at most a few times, I recommend that you configure a Grails 2 app with the same database config settings and using the plugin there, then moving the generated files to your Grails 3 app.
I was using ember as a part of my grails application, All libs were provided by a ember grails plugin 1.7. As I would eventually like to move to newer version I have tried both to replace ember and ember-data with newer files versions as well as to add references to hosted files, but I would always get during run:
template.buildRenderNodes is not a function
My guess from that error message would be you are still referencing handlebars rather than htmlbars which Ember now uses. You now need ember-template-compiler.js, see http://emberjs.com/builds/#/release.
As Christopher mentions, you will probably feel less pain by going up a version at a time and also moving to Ember CLI if you haven't already