Search code examples
javavisual-studio-codeservlets

How can we create a dynamic web project in VS code?


There is no option to create a new dynamic web project in vs code like eclipse. Is there is a way to do it like templates?

I tried to figure out but none helps


Solution

  • First you need to install the Community Server Connectors extension.

    enter image description here

    Then Ctrl+Shift+P --> Servers: Add Local Servers....

    enter image description here

    In the pop-up explorer window, select the decompressed tomcat root directory (that is, the value of the system environment variable CATALINA_HOME).

    enter image description here

    Confirm that the information is correct and click Finish.

    enter image description here

    Select the generated war package, right-click and select Run on Server.

    enter image description here

    In the SERVERS view, right-click on the tomcat service and select Server Actions... --> Show in browser... --> http://localhost:8080/demo/.

    enter image description here

    The browser will open and display the project page.

    enter image description here