I am trying to create a simple web project using Tomcat in Java.
In the web.xml file, I point to the servlet that I want to run when someone goes to http://localhost:8080/MyProject, so I used /the URL as a template. This worked, but the disadvantage is that all the links to the html and javascript files are passed to the main servlet, and not to the corresponding file. Changing the Url template from /to /Homeor /Maincorrects it.
What am I doing wrong?
source
share