问题
I'm trying to deploy my java web site on a Debian online server. For that, I install Jetty (following this : http://zetcode.com/java/jetty/install/)
Jetty seems to be ok on the server because when I enter http://myipaddress:8080. I have the "Welcome to Jetty".
Then, I use Filezilla to upload my war on the server. I compile my war with Eclipse and Maven :
<groupId>com.example</groupId>
<artifactId>test</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>test</name>
I compile it with mvn clean package. I had my war file. And I put it on the server :
I tried to put it in opt/jetty/webapps and opt/web/mam/webapps
But when I tried to access to my web site by doing http://myipaddress/test, I received a 404 error.
And I tried my command line with the curl command, I received an 404 error too.
I know it's basic, but I'm blocked..
How can I be sure that my war is ok? How can I be sure that my jetty configuration is ok?
Thanks
回答1:
I fixed it by deleting the jetty installation and reinstall it. I put my WAR in the opt/jetty/webapps.
来源:https://stackoverflow.com/questions/45848086/error-404-when-i-try-to-deploy-my-war-on-jetty-on-debian-9