在项目web.xml文件中添加: <mime-mapping> <extension>ico</extension> <mime-type>image/x-icon</mime-type> </mime-mapping>