HTTP Status 404 - on Eclipse with Tomcat (with no generated web.xml)

shjnlee :

I'm working on an example with Eclipse and Tomcat 9.0, dynamic web module 4.0, without generating web.xml deployment.

The project directory is as follow:

enter image description here

where reverse.java is a servlet that get the input parameter send it back to the output page. For some reason, after I hit the submit button, the "/reverse" servlet cannot be reached and tomcat prompts HTTP Status 404 - Not Found page. What did I do wrong?

After hitting the submit button on inputForm.jsp page, it got the error:

Type Status Report

Message /reverse

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

URL I called on submit when enter input = "abcd": http://localhost:8080/reverse?input=abcd

What did I do wrong? Thanks.

mentallurg :

If you didn't set set context root explicitly, it is set by default to the same name as your project. If your project name is "bla", then the URL to call the servlet should be following: http://localhost:8080/bla/reverse.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Eclipse & Tomcat Error: HTTP Status 404 – Not Found:

HTTP Status 404 Tomcat Apache

Apache Tomcat 9 - HTTP Status 404 on browser

tomcat changes 404 status into 403 for http delete

Http Status 404 after installing Tomcat 9

HTTP Status 404 – Not Found tomcat spring

HTTP Status 404 – Not Found on Tomcat server

Get HTTP Status 404 - Not Found, when the name of a dynamic web project renamed and deployed on Glassfish with Eclipse

Error 404 Jersey Tomcat Eclipse Web service

Maven web project HTTP Status [404] – [Not Found]

Tomcat 8 Http status 404 The requested resource is not available

How to redirect "HTTP Status 404 – Not Found" to an error information page in tomcat?

http status 404 hello.jsp (apache tomcat 6)

HTTP Status 404 Not Found For Jersey REST application with Eclipse and Payara server

404 Error for a Jersey Tomcat web server created in eclipse with java

Eclipse, tomcat, 404 error

Eclipse Tomcat Error 404

Jersey - Eclipse - Tomcat - 404

HTTP Status 404 - /LoginAuth

HTTP Status 404 -

Simple JAX-RS with Tomcat - 404 Not Found (No web.xml)

Getting HTTP Status 404 - / error message when hitting URL http://localhost:8080/ in Tomcat?

Jersey tomcat and eclipse: error 404

How can I ignore the error of HTTP Status 404 in Tomcat v7.0?

JAX-RS Rest service giving "HTTP Status 404 – Not Found" error tomcat while accessing in docker

Tomcat started but the database tables aren't being created and localhost:8080 shows "HTTP Status 404"

HTTP Status 404 - Servlet not found

Servlet: HTTP Status 404 - Not Found

HTTP Status 404 - /SpringMvcDemo/hello

TOP Ranking

HotTag

Archive