GRAILS-1019: Allowing expressions to be used with the 'disabled' attribute for g...
[grails.git] / sandbox / books / INSTRUCTIONS.txt
blob45cff519decfc585041a4db234fe1e2776aa6c85
1 BOOKS SAMPLE APPLICATION FOR GRAILS
2 ===================================
4 This sample application demonstrates a simple page flow application that maintains a list of books.
6 The directory structure is:
8 <root>
9   /grails-app
10     /BookFlow.groovy
11   /jsp
12     /listBooks.jsp
13     /bookDetail.jsp
15 This application clearly demonstrates how compact Grails applications are and how little configuration is required.
17 BUILDING
18 ========
20 If you have obtained Grails from CVS make sure the JAR file is build by running this command in the Grails home directory: 
22 ant jar
24 To deploy this application set the GRAILS_HOME environment to the root directory of the Grails distribution or project.
26 At the command prompt change directory to the project root directory which is ${GRAILS_HOME}/samples/books.
28 Next run this command to initiate the dictory structure:
30 ${GRAILS_HOME}/bin/grails init
32 If you get "permission denied", this file is not executable. In that case run the command as follows:
34 /bin/sh ${GRAILS_HOME}/bin/grails init
36 Then run this command to create the WAR file:
38 ${GRAILS_HOME}/bin/grails war
40 This application is written against the Servlet 2.3 specifications so should run in any servlet container.
42 Deploy grails-app.war in you servlet container (for most containers this mean copying the file in the webapps folder).
44 Browse to http://<server_address>:<server_port>/books/books to test the application. You can also rename the WAR file to use another context path.
46 Please post a message on the Grails mailing list if you experience any problems running this sample application.
48 Steven
50 ALTERNATIVE
51 ===========
53 With a Groovy installation in place, you can build, run, and test the grails book sample by running
54  groovy build.groovy
55 To make this happen, you need
56 - a webserver installation like tomcat (recommended: tomcat 5)
57 - a download of Canoo WebTest from http://webtest.canoo.com/webtest/build.zip
58   to a directory that is referred to as WEBTEST_HOME
59 Getting the classpath for testing right, requires a bit of work.
60 - adapt your GROOVY_HOME/conf/groovy_classworlds.conf to include your
61   ${user.home}/.groovy/lib dir
62 - copy all jar files from WEBTEST_HOME/lib and its subdirs to
63   ${user.home}/.groovy/lib (i.e. 'flat')
64 - adapt the settings in build.properties to your personal needs
65   when using with tomcat 5 make sure to copy 
66   TOMCAT_HOME/server/catalina_ant.jar to ${user.home}/.groovy/lib
68 [todo: provide an installer script]
70 After running 'groovy build.groovy' successfully you find the test reports
71 in tmp/webtest/results/WebTestResults.html
72 When running on windows, this file will be automatically opened for you
73 in your default browser.