2

I'm using the gradle-tomcat-plugin to run tomcat on a simple web application. What Im trying to do is to change the root web application directory from src/main/webapp/ to WebContent/

tomcat {
    httpPort = 8080
    httpsPort = 8081
    enableSSL = false

    jasper {
        uriroot = file('WebContent')
    }
}

This is not working at all when I run gradle tomcatRun and it still maps to src/main/webapp/.

Any suggestions?

RachelD
  • 4,072
  • 9
  • 40
  • 68

1 Answers1

1

Configuring the web application directory in Gradle is independent of the configuration properties exposed by the Tomcat plugin. The plugin that sets the default web app directory to src/main/webapp is the War plugin. To change this default directory assign a new value to the property webAppDirName, as shown in the following example:

webAppDirName = 'WebContent'
Benjamin Muschko
  • 32,442
  • 9
  • 61
  • 82