I am using Spring mvc + maven + tomcat. When I write a java web app project in NetBeans, I periodically launch it with the F6 button (Run Project). That is, I do not make it explicitly deployed on Tomkat. With this, I want to check the changes just made. And it became a bo-oh-oh big mistake for me. It backfired. There is such a folder-file structure:

In form.jsp, I invoke my files like this:
<link rel="stylesheet" type="text/css" href="/css/css1.css"> <script type="text/javascript" src="/js/jquery-2.1.3.js"> </script> And of course, in the config of the spring I registered the paths, so that the spring could find static resources:
<mvc:resources mapping="/css/**" location="/WEB-INF/css/" /> <mvc:resources mapping="/js/**" location="/WEB-INF/js/" /> The essence of the problem:
When I run the F6 button everything works fine. All JS, CSS are connected as it should. But when I do the mvn package and throw out the finished war in the Tomskata webapps folder, it does not find these static files. Only the bare form.jsp is opened without any CSS, JS. What to do?
The second problem : it is very strange that when you start F6, the URL path in the browser is not the same as when you start the war. If I run F6, the path is http://localhost:8080/spring-chat-test/
And if I run Closed, then http://localhost:8080/spring-chat-test-1.0/