Wednesday March 18, 2009
TOTD #75: Getting Started with Grails using GlassFish v3 Embedded
For a change, this blog entry is talking about something that exists
for a while now :)
Basically, I wanted to setup a demo environment for Grails and GlassFish
v3 Prelude on my machine and so decided to dcument the steps
along the process. More detailed steps with explanation are available
on GlassFish/Grails
Getting Started Wiki.
| ~/demos/glassfishv3-prelude >./bin/updatetool The software needed for this command (updatetool) is not installed. If you choose to install Update Tool, your system will be automatically configured to periodically check for software updates. If you would like to configure the tool to not check for updates, you can override the default behavior via the tool's Preferences facility. When this tool interacts with package repositories, some system information such as your system's IP address and operating system type and version is sent to the repository server. For more information please see: http://wiki.updatecenter.java.net/Wiki.jsp?page=UsageMetricsUC2 Once installation is complete you may re-run this command. Would you like to install Update Tool now (y/n): y Install image: /Users/arungupta/demos/glassfishv3-prelude/bin/.. Installing pkg packages. Installing: [pkg:/pkg@1.0.7,0-15.1269:20081008T212532Z, pkg:/python2.4-minimal@2.4.5.0,0-15.1269:20081008T212544Z] Installing updatetool packages. Installing: [pkg:/updatetool@2.0.0,0-15.1269:20081008T212613Z, pkg:/wxpython2.8-minimal@2.8.8,0-15.1269:20081008T212630Z] Registering notifier: Already registered. Initialization complete. Software successfully installed. You may now re-run this command (updatetool). |

| ~/demos/glassfishv3-prelude/glassfish/grails
>export
GRAILS_HOME=~/demos/glassfishv3-prelude/glassfish/grails ~/demos/glassfishv3-prelude/glassfish/grails >export PATH=$GRAILS_HOME/bin:$PATH |
| ~/demos/glassfishv3-prelude/glassfish/grails/samples
>grails create-app
bookstore Welcome to Grails 1.0.4 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails Base Directory: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples Note: No plugin scripts found Running script /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/scripts/CreateApp.groovy Environment set to development [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/src [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/src/java [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/src/groovy [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/controllers [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/services [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/domain [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/taglib [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/utils [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/views [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/views/layouts [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/i18n [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/conf [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/test [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/test/unit [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/test/integration [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/scripts [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/web-app [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/web-app/js [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/web-app/css [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/web-app/images [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/web-app/META-INF [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/lib [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/conf/spring [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/conf/hibernate [propertyfile] Creating new property file: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/application.properties [copy] Copying 2 files to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore [copy] Copied 1 empty directory to 1 empty directory under /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore [copy] Copying 2 files to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/web-app/WEB-INF [copy] Copying 5 files to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/web-app/WEB-INF/tld [copy] Copying 28 files to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/web-app [copy] Copying 18 files to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app [copy] Copying 1 file to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore [copy] Copying 1 file to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore [copy] Copying 1 file to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore [copy] Copying 1 file to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore [propertyfile] Updating property file: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/application.properties Created Grails Application at /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore |
| ~/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore
>grails
create-domain-class book Welcome to Grails 1.0.4 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails Base Directory: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore Note: No plugin scripts found Running script /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/scripts/CreateDomainClass.groovy Environment set to development [copy] Copying 1 file to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/domain Created Domain Class for Book [copy] Copying 1 file to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/test/integration Created Tests for Book |
| class Book { String title String author } |
| ~/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore
>grails
create-controller Book Welcome to Grails 1.0.4 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails Base Directory: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore Note: No plugin scripts found Running script /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/scripts/CreateController.groovy Environment set to development [copy] Copying 1 file to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/controllers Created Controller for Book [mkdir] Created dir: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/views/book [copy] Copying 1 file to /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/test/integration Created ControllerTests for Book |
| class BookController { def scaffold = Book } |
| ~/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore
>grails run-app Welcome to Grails 1.0.4 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails Base Directory: /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore Note: No plugin scripts found Running script /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/scripts/RunApp.groovy Environment set to development Starting GlassFish embedded server... [mkdir] Created dir: /Users/arungupta/.grails/1.0.4/projects/bookstore/classes [groovyc] Compiling 8 source files to /Users/arungupta/.grails/1.0.4/projects/bookstore/classes [mkdir] Created dir: /Users/arungupta/.grails/1.0.4/projects/bookstore/resources/grails-app/i18n [native2ascii] Converting 11 files from /Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/grails-app/i18n to /Users/arungupta/.grails/1.0.4/projects/bookstore/resources/grails-app/i18n [copy] Copying 1 file to /Users/arungupta/.grails/1.0.4/projects/bookstore/classes [copy] Copying 1 file to /Users/arungupta/.grails/1.0.4/projects/bookstore/resources [copy] Copying 1 file to /Users/arungupta/.grails/1.0.4/projects/bookstore Running Grails application.. Application name : bookstore Web App Root :/Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/web-app web.xml:/Users/arungupta/.grails/1.0.4/projects/bookstore/resources/web.xml Mar 18, 2009 10:19:09 PM CommonClassLoaderManager Skipping creation of CommonClassLoader as there are no libraries available INFO: urls = [] no resource bundle found for version, using default GlassFish version Mar 18, 2009 10:19:09 PM AppServerStartup run INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started Mar 18, 2009 10:19:09 PM com.sun.enterprise.v3.services.impl.GrizzlyProxy start INFO: Listening on port 8080 Mar 18, 2009 10:19:10 PM org.glassfish.admin.mbeanserver.ConnectorStartupService$ConnectorsStarterThread startConnector INFO: Started JMXConnector, JMXService URL = service:jmx:rmi:///jndi/rmi://192.168.1.145:8686/jmxrmi Mar 18, 2009 10:19:10 PM com.sun.enterprise.v3.admin.adapter.AdminEndpointDecider setGuiContextRoot INFO: Admin Console Adapter: context root: /admin Mar 18, 2009 10:19:10 PM com.sun.enterprise.v3.server.AppServerStartup run INFO: GlassFish v3 Prelude startup time : Embedded(418ms) startup services(887ms) total(1305ms) Mar 18, 2009 10:19:10 PM com.sun.enterprise.web.WebContainer createHttpListener INFO: Created HTTP listener http-listener-1 on port 8080 Mar 18, 2009 10:19:10 PM com.sun.enterprise.web.WebContainer createHosts INFO: Created virtual server server Mar 18, 2009 10:19:11 PM org.apache.catalina.loader.WebappLoader setClassPath INFO: Unknown loader org.glassfish.grails.MaskingClassLoader@3b948e75 class org.glassfish.grails.MaskingClassLoader Mar 18, 2009 10:19:12 PM org.apache.catalina.loader.WebappLoader setClassPath INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@191fa2af class org.glassfish.internal.api.DelegatingClassLoader Mar 18, 2009 10:19:12 PM org.apache.catalina.core.ApplicationContext log INFO: PWC1412: WebModule[/bookstore] ServletContext.log():Set web app root system property: 'bookstore-development-0.1' = [/Users/arungupta/demos/glassfishv3-prelude/glassfish/grails/samples/bookstore/web-app/] Mar 18, 2009 10:19:12 PM org.apache.catalina.core.ApplicationContext log INFO: PWC1412: WebModule[/bookstore] ServletContext.log():Initializing log4j from [file:/Users/arungupta/.grails/1.0.4/projects/bookstore/resources/log4j.properties] Mar 18, 2009 10:19:12 PM org.apache.catalina.core.ApplicationContext log INFO: PWC1412: WebModule[/bookstore] ServletContext.log():Initializing Spring root WebApplicationContext [0] spring.GrailsWebApplicationContext Refreshing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@430b4506: display name [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@430b4506]; startup date [Wed Mar 18 22:19:14 PDT 2009]; parent: org.springframework.web.context.support.XmlWebApplicationContext@6ceb51a8 [0] spring.GrailsWebApplicationContext Bean factory for application context [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@430b4506]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1f43243e Mar 18, 2009 10:19:17 PM org.apache.catalina.core.ApplicationContext log INFO: PWC1412: WebModule[/bookstore] ServletContext.log():Initializing Spring FrameworkServlet 'grails' Mar 18, 2009 10:19:17 PM com.sun.enterprise.web.WebApplication start INFO: Loading application bookstore at /bookstore Server running. Browse to http://localhost:8080/bookstore |





Posted by Arun Gupta in web2.0 | Comments[1]
|
|
|
|
|
Wednesday April 23, 2008
TOTD #31: CRUD Application using Grails - Hosted on GlassFish and MySQL
TOTD
#30 explained how to create CRUD application using Grails and hosted using
in-built Jetty servlet
engine and in-memory HSQLDB
database. Jetty and HSQLDB are built into Grails and allows to start easily.
You can also use GlassFish and
MySQL for deploying your applications in
production environment.
This blog entry walks you through the steps of deploying a Grails
application on GlassFish and MySQL.
| ~/testbed/grails-1.0.2/samples/crud
>sudo
/usr/local/mysql/bin/mysqld_safe --user root --console Starting mysqld daemon with databases from /usr/local/mysql/data |
| ~/testbed/grails-1.0.2/samples/crud >/usr/local/mysql/bin/mysqladmin create crudProd --user root |
| dataSource
{ pooled = false driverClassName = "com.mysql.jdbc.Driver" username = "root" password = "" dialect = "org.hibernate.dialect.MySQL5InnoDBDialect" } hibernate { cache.use_second_level_cache=true cache.use_query_cache=true cache.provider_class='org.hibernate.cache.EhCacheProvider' } // environment specific settings environments { development { dataSource { dbCreate = "create-drop" // one of 'create', 'create-drop','update' url = "jdbc:hsqldb:mem:devDB" } } test { dataSource { dbCreate = "update" url = "jdbc:hsqldb:mem:testDb" } } production { dataSource { dbCreate = "update" url = "jdbc:mysql://localhost/crudProd" } } } |
| ~/testbed/grails-1.0.2/samples/crud
>grails war Welcome to Grails 1.0.2 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /Users/arungupta/testbed/grails-1.0.2 Base Directory: /Users/arungupta/testbed/grails-1.0.2/samples/crud Note: No plugin scripts found Running script /Users/arungupta/testbed/grails-1.0.2/scripts/War.groovy Environment set to production [delete] Deleting: /Users/arungupta/.grails/1.0.2/projects/crud/resources/web.xml [delete] Deleting directory /Users/arungupta/.grails/1.0.2/projects/crud/classes . . . [propertyfile] Updating property file: /Users/arungupta/testbed/grails-1.0.2/samples/crud/staging/WEB-INF/classes/application.properties [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/staging/WEB-INF/plugins [copy] Warning: /Users/arungupta/testbed/grails-1.0.2/samples/crud/plugins not found. [jar] Building jar: /Users/arungupta/testbed/grails-1.0.2/samples/crud/crud-0.1.war [delete] Deleting directory /Users/arungupta/testbed/grails-1.0.2/samples/crud/staging Done creating WAR /Users/arungupta/testbed/grails-1.0.2/samples/crud/crud-0.1.war |
| ~/testbed/grails-1.0.2/samples/crud
>~/testbed/glassfish/v3/p2b9/glassfish/bin/asadmin
deploy crud-0.1.war crud-0.1 deployed successfully Command deploy executed successfully. |




Please leave suggestions on other TOTD that you'd like to see. A complete archive is available here.
Posted by Arun Gupta in web2.0 | Comments[4]
|
|
|
|
|
Tuesday April 22, 2008
TOTD #30: CRUD Application using Grails - Hosted on Jetty and HSQLDB
After a simple
Grails application, let's create a CRUD
application. Such an application allows to perform basic database
operations to read table rows from the database, create new rows, and
edit and delete existing rows. This blog shows how such an application
can be created using Grails, hosted on built-in Jetty servlet engine
and use in-memory HSQLDB
database for persistence.
A follow-up entry will show how this application can be deployed in
production mode on GlassFish
and using MySQL database.
| ~/testbed/grails-1.0.2/samples
>grails create-app
crud Welcome to Grails 1.0.2 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /Users/arungupta/testbed/grails-1.0.2 Base Directory: /Users/arungupta/testbed/grails-1.0.2/samples Note: No plugin scripts found Running script /Users/arungupta/testbed/grails-1.0.2/scripts/CreateApp.groovy Environment set to development [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/src [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/src/java [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/src/groovy [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/controllers [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/services [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/domain [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/taglib [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/utils [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/views [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/views/layouts [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/i18n [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/conf [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/test [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/test/unit [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/test/integration [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/scripts [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/web-app [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/web-app/js [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/web-app/css [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/web-app/images [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/web-app/META-INF [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/lib [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/conf/spring [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/conf/hibernate [propertyfile] Creating new property file: /Users/arungupta/testbed/grails-1.0.2/samples/crud/application.properties [copy] Copying 2 files to /Users/arungupta/testbed/grails-1.0.2/samples/crud [copy] Copying 2 files to /Users/arungupta/testbed/grails-1.0.2/samples/crud/web-app/WEB-INF [copy] Copying 5 files to /Users/arungupta/testbed/grails-1.0.2/samples/crud/web-app/WEB-INF/tld [copy] Copying 87 files to /Users/arungupta/testbed/grails-1.0.2/samples/crud/web-app [copy] Copying 17 files to /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app [copy] Copying 1 file to /Users/arungupta/testbed/grails-1.0.2/samples/crud [copy] Copying 1 file to /Users/arungupta/testbed/grails-1.0.2/samples/crud [copy] Copying 1 file to /Users/arungupta/testbed/grails-1.0.2/samples/crud [propertyfile] Updating property file: /Users/arungupta/testbed/grails-1.0.2/samples/crud/application.properties Created Grails Application at /Users/arungupta/testbed/grails-1.0.2/samples/crud |
| ~/testbed/grails-1.0.2/samples/crud
>grails
create-domain-class state Welcome to Grails 1.0.2 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /Users/arungupta/testbed/grails-1.0.2 Base Directory: /Users/arungupta/testbed/grails-1.0.2/samples/crud Note: No plugin scripts found Running script /Users/arungupta/testbed/grails-1.0.2/scripts/CreateDomainClass.groovy Environment set to development [copy] Copying 1 file to /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/domain Created for State [copy] Copying 1 file to /Users/arungupta/testbed/grails-1.0.2/samples/crud/test/integration Created Tests for State |
| class
State { } |
| class
State { String name String abbrev } |
| class
BootStrap { def init = { servletContext -> new State(name:"California", abbrev:"CA").save() new State(name:"New York", abbrev:"NY").save() new State(name:"Texas", abbrev:"TX").save() new State(name:"Wisconsin", abbrev:"WI").save() } def destroy = { } } |
| ~/testbed/grails-1.0.2/samples/crud
>grails
create-controller state Welcome to Grails 1.0.2 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /Users/arungupta/testbed/grails-1.0.2 Base Directory: /Users/arungupta/testbed/grails-1.0.2/samples/crud Note: No plugin scripts found Running script /Users/arungupta/testbed/grails-1.0.2/scripts/CreateController.groovy Environment set to development [copy] Copying 1 file to /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/controllers Created Controller for State [mkdir] Created dir: /Users/arungupta/testbed/grails-1.0.2/samples/crud/grails-app/views/state [copy] Copying 1 file to /Users/arungupta/testbed/grails-1.0.2/samples/crud/test/integration Created ControllerTests for State |
| class
StateController { def index = { } } |
| class
StateController { def scaffold = State } |
| ~/testbed/grails-1.0.2/samples/crud
>grails run-app Welcome to Grails 1.0.2 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /Users/arungupta/testbed/grails-1.0.2 Base Directory: /Users/arungupta/testbed/grails-1.0.2/samples/crud Note: No plugin scripts found Running script /Users/arungupta/testbed/grails-1.0.2/scripts/RunApp.groovy Environment set to development Running Grails application.. 2008-04-18 17:26:29.962::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2008-04-18 17:26:29.075::INFO: jetty-6.1.4 2008-04-18 17:26:29.155::INFO: No Transaction manager found - if your webapp requires one, please configure one. 2008-04-18 17:26:30.886:/crud:INFO: Set web app root system property: 'crud' = [/Users/arungupta/testbed/grails-1.0.2/samples/crud/web-app/] 2008-04-18 17:26:30.886:/crud:INFO: Initializing Log4J from [file:/Users/arungupta/.grails/1.0.2/projects/crud/resources/log4j.properties] 2008-04-18 17:26:30.945:/crud:INFO: Initializing Spring root WebApplicationContext [0] spring.GrailsWebApplicationContext Refreshing org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@848dfb: display name [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@848dfb]; startup date [Fri Apr 18 17:26:32 PDT 2008]; parent: org.springframework.web.context.support.XmlWebApplicationContext@cddcc3 [1] spring.GrailsWebApplicationContext Bean factory for application context [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@848dfb]: org.springframework.beans.factory.support.DefaultListableBeanFactory@11f136 2008-04-18 17:26:34.655:/crud:INFO: Initializing Spring FrameworkServlet 'grails' 2008-04-18 17:26:35.716::INFO: Started SelectChannelConnector@0.0.0.0:8080 Server running. Browse to http://localhost:8080/crud |





Please leave suggestions on other TOTD that you'd like to see. A complete archive is available here.
Technorati: groovy grails glassfish jetty hsqldb scripting crudPosted by Arun Gupta in web2.0 | Comments[6]
|
|
|
|
|
Today's Page Hits: 3051
Total # blog entries: 1002