okamigo
(Okamigo)
June 6, 2020, 8:40am
1
Hi guys,
After running tomcat on ubuntu with port forwarding its give this error
Can you help to understand whats the problem?
HTTP Status 404 – Not found
Type Status Report
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.35
3 Likes
Hi okamigo,
I was facing the same issue while I was trying to pull Tomcat image from Amazon Linux virtual machine, Here is solution to fix the issue,
docker pull tomcat:latest
docker run -d --name mytomcat -p 8080:8080 tomcat:latest
docker exec -it mytomcat /bin/bash
mv webapps webapps2
mv webapps.dist/ webapps
exit
for explanation go through this article
5 Likes
@rajashekarjangam Moving ~/webapps inside the container solved the issue. Great tip!
1 Like
Thanks a lot for the solution. It resolved my issue.
okiucux
(Okiucux)
August 13, 2021, 3:11am
5
it’s working for me too. thanks a lot
appwebtech
(Appwebtech)
September 2, 2021, 12:28pm
6
Thanks a lot, works for me.
nagbara
(Nagbara)
October 6, 2021, 12:42pm
8
Thanks @rajashekarjangam ,
The solution helped me to get to see the tomcat welcome page http://localhost:8080
I am now left wondering why my deployed application is till returning 404. http://localhost:8080/conference/
tipoo
(Tipoo)
April 16, 2022, 9:59am
9
Hi @nagbara , Did you got any break here ? I’m also facing similar issue.
Appreciate any help here.
Thanks.
avbentem
(Arjan)
April 16, 2022, 10:19am
10
tipoo:
facing similar issue
It’s good to realize that a 404 Not Found is actually generated by Tomcat (or maybe something that is sitting in front of Tomcat, such as Nginx), not by Docker. So, the Docker part that is running Tomcat, and accessing the port on which Tomcat is running in the Docker container, seem to be working just fine.
To debug the cause of the 404 we need many more details.
Thanks a lot. It worked for me too.
Thanks, it worked for me too!
luizpolli
(luizpolli)
August 16, 2023, 5:56pm
13
Solved my issue. Thank you man.
Thanks. This solved my prob.
FROM tomcat:latest
RUN mv /usr/local/tomcat/webapps /usr/local/tomcat/webapps2
RUN mv /usr/local/tomcat/webapps.dist /usr/local/tomcat/webapps
ADD target/sample.war /usr/local/tomcat/webapps/
EXPOSE 8080
CMD [“catalina.sh”, “run”]