避免在 Web 模組歡迎使用檔名稱中使用 /

此規則會標示 web.xml 檔中開頭是正斜線字元 (/) 或反斜線字元 (\) 的任何 Web 模組 <welcome-file>

原始檔掃描器提供了此規則的快速修正程式。 快速修正程式會移除名稱中的 / 或 \。

假設歡迎使用檔清單如下:
<welcome-file-list>
<welcome-file>/index.html</welcome-file>
<welcome-file>\index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>/default.html</welcome-file>
<welcome-file>\default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>

快速修正程式會將程式碼中的四個項目更新為:
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>