Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 58d06c4

Browse files
authored
Merge pull request #24 from Microsoft/clantz/tomcat-tweaks
Tomcat definition tweaks
2 parents 2fc9469 + c3b7dd8 commit 58d06c4

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

containers/java-8-tomcat-8.5/.devcontainer/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
FROM tomcat:8.5-jre8
77

8+
# Copy endpoint specific user settings into container to specify Java path
9+
COPY settings.vscode.json /root/.vscode-remote/data/Machine/settings.json
10+
11+
812
# Configure apt
913
ENV DEBIAN_FRONTEND=noninteractive
1014
RUN apt-get update \
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.home": "/docker-java-home"
3+
}

containers/java-8-tomcat-8.5/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@ This definition includes some test code that will help you verify it is working
3939
3. Start VS Code, press <kbd>F1</kbd>, and select **Remote-Containers: Open Folder in Container...**
4040
4. Select the `containers/java-8-tomcat-8.5` folder.
4141
5. After the folder has opened in the container, press <kbd>F1</kbd>, and select **Tomcat: Add Tomcat Server**.
42-
6. In the prompted File Dialog, select `/usr/local/tomcat` and click **OK** button to add a new Tomcat Server.
43-
7. Go to VS Code Terminal viewlet, click **+** button to new a bash terminal, then run the commands below to generate a war file.
44-
```
45-
cd test-project
46-
mvn clean package
47-
```
48-
8. Find the war file `test-project/target/mywebapp-0.0.1-SNAPSHOT.war`, click the context menu **Debug on Tomcat Server**, then the application will be started in a Tomcat Server.
42+
6. Select `/usr/local/tomcat` as the path and click **OK** to add a new Tomcat Server.
43+
7. Press <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>`</kbd> to open a new terminal, then run the commands below to generate a war file.
44+
```
45+
cd test-project
46+
mvn clean package
47+
```
48+
8. Navigate to `test-project/target/mywebapp-0.0.1-SNAPSHOT.war` in the explorer, right-click on the file, and select **Debug on Tomcat Server**
49+
9. The application will then start in the Tomcat Server!
4950
5051
## License
5152

0 commit comments

Comments
 (0)