Configuring your Application
Now that you have a running application, you can modify it to make it more interesting. If you create something really cool and you're willing to share, let us know.
- You can change any of the generated controllers and views found in C:\workspace\grails1.0\cog-apps\yourApplication\grails-app\wdcontrollers according to your needs.
- You can add non-UI business logic to the services folder found in grails-app.
FAQ for creating CoGs Application
When I click on dev.html it gives me a "Page cannot be displayed" error.
Go to your Composition on Grails application directory, e.g. C:\workspace\grails1.0\cog-apps\MyFirstApplication. You should find a cogConfig.properties file here. Right click and open this with a text editor. Make sure that the http protocol port number listed here matches with the http port number in CE. To check this, go to the SAP Management Console, CE and under the J2EE server, go to Access Points and make sure that the port number for HTTP protocol matches what is specified in cogConfig.properties. If not, update cogConfig.properties with this port number and run the cog-generate-html script again.
The changes I made to my domain class don't seem to be reflected in the UI in my application.
In your application, right click on any controller and open in new window. Then in the address bar of your browser, at the end of the present URL type &reload=true . This would force a compilation of all the groovy files in your application.
When I do reload=true it cleans up my database.
Grails by default is set to use HyperSonic database which is a in-memory database. You can set grails to use MySQL if you wish to keep your database intact.
I'm running in dev mode (using dev.html) and the CE server keeps going down.
Most likely there is a syntax error in the code which is not deployed to the j2ee engine. Workaround: deploy your application, this will throw the correct error or debug. Once you fix the errors, you shouldn't have the problem anymore.
This is not my first application, is there something different that I need to do?
If its your second or later application, you should launch a command prompt using RunMeFirst.bat. Please note that using setUp.bat would regenerate grails.sda before launching the command prompt. This isn't required unless you have new additional libraries added that are not yet deployed.