Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Status 404 - The requested resource (/ProjectName/) is not available

I'm getting the following error when running my Eclipse project on Tomcat server:

HTTP Status 404 - The requested resource (/ProjectName/) is not available.

The URL in browser's address bar is http://localhost:8080/ProjectName/.

I really don't know what is missing in my files. I have an Index.jsp in the /WebContent folder and my web.xml contains below entry:

<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list>
like image 215
cProg Avatar asked Oct 17 '11 20:10

cProg


1 Answers

By default, when you open the project root folder as in http://localhost:8080/ProjectName/ instead of a physical file as in http://localhost:8080/ProjectName/Index.jsp, then the server will lookup for a welcome file in web.xml. If none is found, then you'll get this 404 "Page not found" error.

In your case, URLs and file names are case sensitive. You declared index.jsp to be the welcome file, but you mentioned that you've an Index.jsp. Rename it to index.jsp and then you'll be able to open the webapp's context root with the welcome file this way.

See also:

  • How to configure welcome file list in web.xml
  • Change default homepage in root path to servlet with doGet
  • Set default home page via <welcome-file> in JSF project
like image 143
BalusC Avatar answered Sep 22 '22 19:09

BalusC