0

I started to do a project in eclipse ide using tomcat server. So apparently i did not get any errors in jsps and servlets. But i dont get any output and it display 404 error without any msg

heres what i tried I uninstall and reinstall the tomcat server Give web.xml file to the correct path Imported all the java files Change the tomcat-users.xml code

can someone pls help me with this error?1

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555

3 Answers3

0

I think your Jsp file is not positioned under the Web-Info folder try TO charge the position of the Jsp file right there

SHl MRJ
  • 63
  • 10
0

When we request a resource on the server through a browser, it may be a JSP or servlet. If the resource to be accessed does not exist, a 404 error will be generated.

Due to following reason we get 404.

  1. The URL is not handled by any java servlets.

    Please check for URL mapping in servlet classes. 
    
  2. Java servlet forwarding to a resource that does not exist

    Please correct the forward path in java code
    
  3. Please check URL is case sensitive

Vikram Shekhawat
  • 627
  • 2
  • 8
  • 12
0

In every web application there are some files, which should not be accessible from the web. In the case of the Servlet Specification, the WEB-INF and META-INF are not directly accessible through HTTP:

A special directory exists within the application hierarchy named WEB-INF. This directory contains all things related to the application that aren’t in the document root of the application. Most of the WEB-INF node is not part of the public document tree of the application.

(from the Servlet specification)

Just move your *.jsp file out of the WEB-INF directory and you'll be able to access it directly from your browser.

Piotr P. Karwasz
  • 12,857
  • 3
  • 20
  • 43