Get access to endpoints of the deployed application
date
Aug 25, 2022
slug
access-to-endpoints-of-deployed-app
status
Published
tags
Bugfix
AWS
CI/CD
Docker
Jenkins
Tomcat
summary
type
Post
Background
I had my eCommerce application deployed to a
Tomcat server which is on the same EC2 instance as Jenkins but in a different Docker container.
Problem
Now I want to make requests to the endpoints in
Postman using the public IP addresses of the EC2 instance, but I got an HTTP 404 error.I also got this error when I tried to get access to the application through
Tomcat management page.Solution
To solve this problem, follow the steps below:
- Use the correct
Tomcatversion
The
Tomcat image I used is built using the Tomcat version 10:We have to use
Tomcat version 9.0 instead:
- Configure the scope of
Tomcatdependency

- Initialize the
Servletcontext required byTomcatby implementing theSpringBootServletInitializerinterface

- Make a deployment again
Now we can make request to the endpoints successfully.
