I'm trying to create a simple web project using Tomcat in Java.
In the web.xml file, I point to a servlet that I want to be run when someone goes to http://localhost:8080/MyProject
, so I used /
as the URL pattern. That worked, however it has the disadvantage that all links to html and javascript files are being passed on to the main servlet instead of the appropriate file itself. Changing the Url pattern from /
to /Home
or /Main
fixes it.
What am I doing wrong?