Issue
I have made a simple dynamic web project in eclipse with tomcat When i run my index.jsp file it throws 404 error. Below is screenshot of my web project
As you can see index.jsp is located inside Web Content Folder but it still show 404 error Also when i run it on my firefox browser it raises same 404 error but localhost:8080 shows tomcat home page so its working fine
Can anyone tell me what am i doing wrong here?
Solution
Sometimes as JB said it may not have been correctly deployed reason being that the web.xml file was not valid. Restarting the server deletes old(maybe corrupted) files and generates new web files which are needed to run your app. I use glassfish and sometimes when i make very significant changes to my project, i restart the server to reflect or those changes correctly by generating new files based on them. Sometimes saving and running is not enough since it doesn't overwrite all the required.
Answered By - user2691659
Answer Checked By - David Marino (JavaFixing Volunteer)