Search code examples
javatomcat8jsf-2.2

Tomcat serves not found but website works


The website is up and look fine, but when I do inspect using google chrome I see in console:

Failed to load resource: the server responded with a status of 404 ()

and my home page is very simple that not import any css or js fileenter image description here

And that's why when I check the status of my website in production for example in this website: https://www.isitdownrightnow.com/

I get 404 error and my website is really working.


Solution

  • I think you DONT put your welcome page (index.html...) page under webapp folder, try to put your welcome page (index.html, index.xhtml...) under webapp folder directly scr>main>webapp>index.xhtml and also configure web.xml:

    <welcome-file-list>
    <welcome-file>index.xhtml</welcome-file>