Search code examples
javaintellij-ideagradlevs-web-application-project

Enabling web application support in Intellij IDEA


I have a Gradle Java project with embedded jetty server. I want to enable web application support for the same project.

The Intellij IDEA help tells how to enable for an existing project in the below link. https://www.jetbrains.com/help/idea/2016.1/enabling-web-application-support.html#d1788100e258

But the procedure uses a ultimate edition of Intellij IDEA. I am working on Community edition. Is there a way I can manually enable the web application support on the community edition?

Can someone please provide inputs on this?


Solution

  • Apparently, I did not find a way to enable web application into the Intellij Community Edition.

    The reason I wanted to enable web application was to define the servlet context in the web.xml file. There is an alternate way of doing it by programmatically. I defined a ServletContextHandler and set the setInitParameter for the ServletHolder. The below link describes how to do that,

    http://www.nikgrozev.org/2014/10/16/rest-with-embedded-jetty-and-jersey-in-a-single-jar-step-by-step/