Learn Java for Web Development
299 Chapter 7 Rapid Web Development with Grails Live in fragments no longer, only connect. —Edgar Morgan Foster Grails takes web ...
300 CHAPTER 7: Rapid Web Development with Grails and it includes a web container, database, build system, and test harness that ...
CHAPTER 7: Rapid Web Development with Grails 301 (^1) http://www.h2database.com/html/main.html (^2) http://wiki.sitemesh.org/dis ...
302 CHAPTER 7: Rapid Web Development with Grails Installing Grails Before installing Grails, you will need as a minimum a Java D ...
CHAPTER 7: Rapid Web Development with Grails 303 This will create a new directory called helloworld inside the current one that ...
304 CHAPTER 7: Rapid Web Development with Grails This will start an embedded server on port 8080 that hosts your application. Yo ...
CHAPTER 7: Rapid Web Development with Grails 305 Bookstore Application In this chapter, you will be learning to leverage the Gra ...
306 CHAPTER 7: Rapid Web Development with Grails Instead of creating the application from the command line, you can use the IDE ...
CHAPTER 7: Rapid Web Development with Grails 307 Figure 7-5. Configuring GGTS with Grails click Grails and then the Add button. ...
308 CHAPTER 7: Rapid Web Development with Grails To create a new project in GGTS, use the menu option File ➤ New ➤ Grails Projec ...
CHAPTER 7: Rapid Web Development with Grails 309 Since you have already created the project from the command line, you can impor ...
310 CHAPTER 7: Rapid Web Development with Grails Click Next. Select the root directory of the project, as illustrated in Figure ...
CHAPTER 7: Rapid Web Development with Grails 311 Click Finish. Figure 7-10 illustrates the directory structure of the bookstore ...
312 CHAPTER 7: Rapid Web Development with Grails Running the Application At this point, you have a functional application that y ...
CHAPTER 7: Rapid Web Development with Grails 313 The output of executing the run-app target is shown here: Server running. Brows ...
314 CHAPTER 7: Rapid Web Development with Grails Creating the Controller A controller handles requests and creates or prepares r ...
CHAPTER 7: Rapid Web Development with Grails 315 Click Finish. GGTS will generate the controller and tests, as illustrated in th ...
316 CHAPTER 7: Rapid Web Development with Grails Modify the code of index(){}, as illustrated in Listing 7-4. Listing 7-4. Modif ...
CHAPTER 7: Rapid Web Development with Grails 317 Testing the Controller Listing 7-5 illustrates the BookControllerTests test gen ...
318 CHAPTER 7: Rapid Web Development with Grails Modify testSomething() as shown in Listing 7-6. Listing 7-6. Adding the Asserti ...
«
11
12
13
14
15
16
17
18
19
20
»
Free download pdf