Build.gradle with tomcat (8.5.4) in idea

I touched up your project and got it working in a Tomcat instance declared through IntelliJ. For the purpose I sent you a pull request: https://github.com/bigalnz/ptest/pull/1. Just merge it and you should be fine. A lot of the issue you are facing involve around the basic knowledge about Gradle conventions. Please read the following pages to get up to speed:

To get the web application started in the IDE:

  1. Generate the project files via ./gradlew idea
  2. Open the project file ptest.ipr.
  3. Generate the web application archive with ./gradlew build.
  4. Configure Tomcat and point to the generated archive under build/libs.
  5. Start Tomcat. Your index page and your /form page should work.

As you can see we are using a lot of the files that have been generated by the Gradle build and not IntelliJ. That’s what I meant with interoperability issues earlier. I am sure you can also configure the web artifact in IntelliJ and use that. However, that’s more a question for JetBrains. I am not sure where they stand with the functionality.