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

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

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

假設歡迎使用檔清單如下:
<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>