Welcome to the Linux Foundation Forum!

Deploying a .war application on a tomcat server

I am trying to deploy my hello.war file (Java application) on my tomcat server.

At first I do it from the "Manager App" on tomcat's default page, and it shows off afterwards in the Applications section. (Attached below circled in red)

But when I try to connect to it by clicking on that link (https://ip-address/hello) it gives me a standard "HTTP Status 404 – Not Found" with the description: "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists." (picture below)

I even try putting my hello.war file manually in the server in the appropriate folder location ("/opt/tomcat/apache-tomcat-9.0.33/webapps") and add read, execute permissions to 'others' on the .war file, add user 'tomcat' as the owner of the file, restart the service. But still nothing seems to help and I still get that 404

Answers

  • afmorielo
    afmorielo Posts: 9
    edited October 2021

    Well, here I am digging up old threads, for the sake of not leaving questions unanswered.

    If you ever go through the same issue related in this post, my suggestions are:

    • Read the tomcat logs, there are hopefully some insightful error messages there
    • Check your Java application settings, specifically the web.xml file inside the .war
    • If other applications don't return 404, but only yours does, chances are that the problem is with your application

Categories

Upcoming Training