0

I have created a simple java application using spring boot. Then created a war file. Then deployed in the local tomcat 10. Everything runs fine. But when I deployed it in the tomcat of the production server(using Tomcat Web Application Manager), I gets a 404 error. If I go to the defined context path, I get

"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."

Have I missed anything?

MWiesner
  • 8,868
  • 11
  • 36
  • 70
Pial
  • 1
  • 1
  • 1
  • Have you looked at the tomcat logs when you deployed? – tgdavies Jan 09 '22 at 08:21
  • Does this help you ? https://stackoverflow.com/questions/43186315/tomcat-404-error-the-origin-server-did-not-find-a-current-representation-for-th – Keyvan Soleimani Jan 09 '22 at 08:21
  • @tgdavies found this log in "log/catalina.out" path 1. "org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat10/webapps/ABC.war]" 2. " org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of J.... Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. " 3. " org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/tomcat10/webapps/ABC.war] has finished in [1,596] ms" – Pial Jan 09 '22 at 09:43
  • Does this answer your question? [Deploying Spring 5.x on Tomcat 10.x with jakarta.\* package](https://stackoverflow.com/questions/66217350/deploying-spring-5-x-on-tomcat-10-x-with-jakarta-package) – Piotr P. Karwasz Jan 09 '22 at 10:14
  • You can deploy your WAR file to `webapps-javaee` so that Tomcat automatically converts it to Jakarta EE 9. – Piotr P. Karwasz Jan 09 '22 at 10:16

1 Answers1

0

When you deploy your war to a local tomcat server, it deploys your application with your application name.

Try:

http://localhost:port/your_app_name/dashboard
ouflak
  • 2,458
  • 10
  • 44
  • 49