Runs a tomcat server within VSCode. Maven build handles dependencies, compilation and deployment.
- Tested on Ubuntu 22 with Java 17
- Add JVM to $PATH
- Add $JAVA_HOME environment variable
- Add maven bin to $PATH
- newer versions caused issues as of 02/24
- Right click Community Server Connector
- Create Server
- Download Server
- Download Apache Tomcat
- Agree to license
- Right click apache-tomcat
- Edit server
- Note server.home.dir path
- Edit server.home.dir + /conf/tomcat-users.xml
- before
</tomcat-users>
add:
- before
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status"/>
- Edit server.home.dir + /webapps/manager/META-INF/content.xml
- update
<Context>
node to be:
- update
<Context antiResourceLocking="false" privileged="true" >
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow=".*" />
</Context>
- Terminal > Run Task > MVN: install - no test
- Confirm .war file created at target/vscode-tomcat-1.0-SNAPSHOT.war
- Right click .war file
- Run on server
- Select tomcat
- No extra options
- Navigation to http://localhost:8080
- Click Manager App button on the right
- Credentials: admin:admin
- Terminal > Run Build Task