I get 404 while deploying Tomcat and calling localhost://8080
Answered
I have a simple HelloWorld Apache Wicket Project (Dont mind just a Test :D) . The Server starts and Artifact deploys successfully but When i call localhost, I get 404 Error. I Changed the ApplicationContext to "/" but the Error keeps coming. Does anyone know why this happens?
Greetings,
Xaver
Please sign in to leave a comment.
and moreover:
when I try to deploy this app on a running TomCat-instance with tomcat7 plugin the app is deployed and is seen in the list of running app (on tomcat-app-manager-page). But the app still behaves in the same way - with the same 404-error message and the same description.
I tried to recode this tiny app with jersey2 (org.glassfish.jersey), but it didn't change anything.
Seems Manifest is missing. Could you please try to create new project using your git link, add mentioned changes and run it once again.
Ok, I did so. Made a new branch: https://github.com/Sergei-Gots/simple-JAX-RX-implementation/tree/jersey-2_org.glassfish.jersey
cloned it making a new project.
as I could imagine (it seems that is wrong) that there is no manifest is needed at all:
if I try to add a MANIFEST-file I've been asked about a project's main class and class path in my app. But a main class should contain a main()-methond which is not intended to be within servlet-project. E.g. I I have now such a code in the only java class:
I think there is some fundamental misunderstanding. But can't get what is wrong and how should the MANIFEST.mf look like in the absence of the main-method(). To my sad, I haven't found any mention everywhere about MANIFEST.mf in tutorials and examples. There are only pom.xml and web.xml mentioned.
In addition, I tried to create a new Project "Java-Enterprise" with a template "REST-service JAX-RS resource". Unfortunately, with the same result.
What I know about MANIFEST.mf: it will be created usually in target/<applicationName>/META-INF/, so it will be generated however throughout the maven build.
It works in such way for my java-JSP projects. As I can see now it looks very abstract. E.g.:
I checked your branch. It works fine on my side with default Tomcat run configuration. I just started it and then opened "http://localhost:8080/simple_JAX_RX_war_exploded/rest/hello"
Ok, thank you for that.
But what I could do wrong if I still get 404-erorr upon "http://localhost:8080/simple_JAX_RX_war_exploded/rest/hello"
(It's obviously the misspelled by me "simple_JAX_RS"... but ok::)))
App is deployed as it output from Server Log. and I have this simple_JAX_RX_war_exploded artifact seems to be deployed.
and to my happy http://localhost:8080/manager/html
there is a corresponding row in the application list:
P.S last rows of log in IntelliJ are:
Could you please try lower Tomcat version (e.g. Tomcat 9)?
Ok). I tried to use Tomcat 9.0.63 creating a new Run Configuration.
It works.
And I hope it will work with the Tomcat-10 release soon.
But it is sad that there aren't any warnings and cautions about using the latest Tomcat release.
Many thanks!)
You are welcome! Seems we have related request on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-277823/Support-deployment-to-the-Tomcat-10-webapps-javaee-directory. Please vote for it and follow the updates.
I'm getting a 404 error
Hello,
Have you tried lower Tomcat version?
Hi, Yaroslav, can I get your advice or anyone help me
My problem is that I see that my artifact was deployed sucessfully but it gives 404 not found
I am using tomcat 9,0,71 and I am pretty sure that problem is not about the link, because I've already read previous 40 comments
Is it reproducible with some sample project, so I could check it on my side?
Do you want to get screenshots or full directory?
It would be better to have project itself, so I could fully check it on my side.
https://github.com/NEsbolganov/SpringMVC
There my project is
Thanks for the example. I couldn't find what is wrong there. You may try to use project from this article as a template: https://mkyong.com/spring-mvc/spring-mvc-hello-world-example/
@... ty for your attemt of finding out the problem of my learning proccess! I really appreciate that, and I checked out your source, very helpful TY TY TY!
You are welcome!