Skip to content

Updates for the Spring Boot application for Tomcat#2

Merged
cephalin merged 1 commit into
Azure-Samples:tomcatfrom
sadukie:tomcat
Jul 7, 2022
Merged

Updates for the Spring Boot application for Tomcat#2
cephalin merged 1 commit into
Azure-Samples:tomcatfrom
sadukie:tomcat

Conversation

@sadukie
Copy link
Copy Markdown
Contributor

@sadukie sadukie commented Jul 7, 2022

Purpose

  • Adds tomcat branch for the Azure App Service - Java quickstart - Tomcat instructions
  • Note: This is tested and successfully runs on Azure App Service using Java 11, Tomcat 8.5 and Tomcat 9.0, Linux and Windows.

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Fork the code.
  • Switch to the tomcat branch.
  • Create an Azure App Service app with the following settings:
    • Runtime: Java 11
    • Java web server stack: Tomcat 8.5 or Tomcat 9.0
    • Operating System: Windows or Linux
    • On the Deployment tab, set up GitHub integration to pull from your fork, specifically the tomcat branch.
    • Wait a bit for the deployment. (Or go to the Deployment Center > Logs to watch the deployment progress.)
    • Once deployed, you should see "Hello World!"

image

What to Check

Verify that the following are valid

  • pom.xml file changes:
    • Packaging as a WAR file
    • Tomcat dependency is included and marked as provided
    • finalName is set to ROOT to be able to see the app at the root URL rather than a subfolder
  • DemoApplication.java extends the SpringBootServletInitializer class

Other Information

  • This does not work with Tomcat 10.0 regardless of operating system.

@sadukie sadukie marked this pull request as ready for review July 7, 2022 15:47
@cephalin cephalin merged commit 7d1a5ad into Azure-Samples:tomcat Jul 7, 2022
ketrebzi pushed a commit to ketrebzi/java-docs-spring-hello-world that referenced this pull request Mar 9, 2025
Updates for the Spring Boot application for Tomcat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants