Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.58 KB

tomcat_war_deployment.adoc

File metadata and controls

50 lines (36 loc) · 1.58 KB

WAR deployment to Tomcat Windows Service

  1. Add the buildWar task to the end of build.gradle:

    link:../../../../source/deployment/warDeployment_2.groovy[role=include]

    If the target server parameters differ from what you have on the local Tomcat used for fast deployment, provide appropriate application properties. For example, if the target server runs on port 9999, the task definition should be as follows:

    link:../../../../source/deployment/warDeployment_3.groovy[role=include]

    You can also specify a different context.xml file to setup the connection to the production database, for example:

    link:../../../../source/deployment/warDeployment_4.groovy[role=include]
  2. Run the buildWar Gradle task. As a result, app.war and app-core.war files will be generated in the build/distributions directory of your project.

    gradlew buildWar
  3. Download and run Tomcat 8 Windows Service Installer.

  4. Go to the bin directory of the installed server and run tomcat8w.exe with the administrative rights. Set Maximum memory pool to 1024MB on the Java tab. Then go to the General tab and restart the service.

    tomcatPropeties
  5. Add -Dfile.encoding=UTF-8 to the Java Options field.

  6. Copy the generated app.war and app-core.war files to the webapps directory of the server.

  7. Start the Tomcat service.

  8. Open http://localhost:8080/app in your web browser.