Creating and Deploying a WAR
The standard way to deploy a Java-based web application is as a web application resource (WAR) file. There are many tools available to help package a web application into a WAR, from IDEs such as Eclipse and NetBeans to build tools such as Ant and Maven. With Grails, however, those things are rarely needed. A simple Grails script will do it for us.
| | $ grails war |
That single script will compile our source code, pull in our dependencies, and bundle it all into a standard JEE WAR file. For our project, the default name for this file is TekDays-0.1.war. Deploying this to Tomcat is as simple as copying the file to Tomcat’s webapps directory and restarting.
Our app deploys successfully on Tomcat. We’re good to go...for ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access