Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Grails Goodness: Compiling GSP from the Command-Line

DZone's Guide to

Grails Goodness: Compiling GSP from the Command-Line

· Java Zone ·
Free Resource

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

Normally Groovy Server Pages (GSP) are compiled to class files when we create a WAR file of our application. If we want to compile the GSP without creating a WAR file we use the command-line argument ---gsp. Grails will compile the source code of our application and also the Groovy Server Pages. This way we can detect for examples faulty import statements in the GSP source code.

$ grails compile ---gsp 
...
| Compiling 12 GSP files for package [sampleGrails]
...

Code written with Grails 2.2.2.

Download Building Reactive Microservices in Java: Asynchronous and Event-Based Application Design. Brought to you in partnership with Red Hat

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}