UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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."
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
In general, a ".war" file is not an application, it is a java Web ARchive. (The JAVA version of a TAR file.
)
You have to unpack it to get at the application and support files inside.
Generic instructions for opening such a file are available all over the web, but I would seek something more specific.
Where did you get this file?
From that source can you not get deployment instructions?
I thought tomcat had a deployment tool that unpacked and deployed a .war file automagically. Is this not the case?
Actually, there were about 21 such deployment applications to automate the deployment process the last time I did research on that issue. I never trusted any of them and did not use them, but then we were creating and deploying our own war files.
They use different commands and triggers as far as I can recall, and most require some specific setup. Clearly I do not want to get into detail as my information is likely to be obsolete or wrong. If you have used such a tool, you might want to discuss that for the benefit of the OP.
"If the Host autoDeploy attribute is "true", the Host will attempt to deploy and update web applications dynamically, as needed, for example if a new .WAR is dropped into the appBase. For this to work, the Host needs to have background processing enabled which is the default configuration."
Quote:
Originally Posted by wpeckham
In general, a ".war" file is not an application, it is a java Web ARchive. (The JAVA version of a TAR file.)
As per the same link above: "... packaging web application into web application resource (WAR) files. "
Quote:
Actually, there were about 21 such deployment applications to automate the deployment process the last time I did research on that issue.
I don't know when you did that research, but auto-deploying WAR files has been standard behaviour for Tomcat for way over a decade (since v5 in 2003), and probably longer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.