If memory is not a problem on your server then allocate a large amount of memory, such as 512M or more. Also use the server VM option. EG: (-server -Xms512M -Xmx512M). Usually it is better to set both min and max heap size to the same in server applications.
Accordingly, if you’re using Tomcat (and you’d like to allocate a lot of memory), you can edit the catalina.(bin | sh) file found in the bin directory of your Tomcat installation.
For example, on a Windows machine (where I currently find myself these days), I added the following statement around line 71:
set JAVA_OPTS=%JAVA_OPTS% -server -Xms512M -Xmx512M -XX:MaxPermSize=256m.
Groovy provides a highly-expressive and fully object-oriented language for building Grails applications. Groovy allows the developer to convey ideas concisely and naturally, in a manner that’s easy to read and understand. And, Java developers will appreciate its familiar syntax and its seamless Java integration, knowing that they can invoke any Java class from within Groovy, and vice versa.
Installing Grails
1) Download Grails from following URL.
http://grails.org/Download
2) Grails Installation
Extract the archive into an appropriate location; typically C:\grails on Windows.
Create a GRAILS_HOME environment variable that points to the path where you extracted the archive (eg C:\grails on Windows)
If you have not set the JAVA_HOME environment variable yet, create JAVA_HOME environment variable that points to the path where you have installed Java
Append a reference to the “bin” directory within the Grails directory to your PATH variable (eg %GRAILS_HOME%\bin on Windows).
Type “grails” at the command line, if a help message is displayed you are ready to start using Grails!
3) Grails Command-Line Help
>grails
help:
Usage: grails [target]
Targets:
“create-app” – Create a new grails app
“create-controller” – Create a new controller
“create-service” – Create a new service
“create-domain-class” – Create a new domain class
“create-taglib” – Create a new tag library class
“create-test-suite” – Create a new test suite
“create-job” – Create a quartz scheduled job
“generate-controller” – Generates a controller from a domain class
“generate-views” – Generates the views from a domain class
“generate-all” – Generates all artifacts from a domain class
“test-app” – Run current app’s unit tests
“run-app” – Run the application locally and wait
“create-webtest” – Create the functional test layout
“run-webtest” – Run the functional tests for a running app
“shell” – Opens the Grails interactive command line shell
“console” – Opens the Grails interactive swing console
“war” – Create a deployable Web Application Archive (WAR
4) Create “Hello World!” Application
So let’s get started creating our first Grails application. To complete your journey through
creating a “Hello World!” application you’re going to step through the following tasks:
Execute the grails create-app command to create a basic Grails application.
Create something called a controller that will handle a web request.
Use the controller to display some text.
Run the Grails application and view what you achieved in a web browser.
5) To create our “hello” application we need to run the create-app target. This will prompt
you for the name of the application you wish to create. Enter the word hello and hit the return.
>grails create-app
init-props:
create-app:
[input] Enter application name:
hello
Upon completion, the target will have created the “hello” Grails application and the
necessary directory structure.
6) start the Grails application by running the following target