The project is put into tomcat, and the css file becomes blank when you visit the page.

there is no problem when writing a static page, but when you put the whole project into tomcat and visit it again, you will find that css does not work. Later, you can find the problem and can be loaded into the css file, but the file content is empty. But in network, you can see that the css file contains content, and there is only one css file. I do not know why. The console screenshot is as follows:

clipboard.png

clipboard.png

May.14,2021

is the mimetype not matched?


maybe there is something wrong with the web.xml configuration, maybe the charset is inconsistent. I can only think of these two points

Menu