Get a web module with the following resource directory:
. resource/Welcome.html.
. resource/sub1/Welcome.html.
. resource/sub2/Welcome.html.
. resource/sub3.
And the entry in WEB_INF/web.xml:
Select resource/Welcome.html, apply Refactor / Move to resource/sub3. See preview, Do refactor.
Refactoring changes web.xml entry to <welcome-file>../sub3/Welcome.html</welcome-file>. Actually this is not correct:
1. welcome-file entry is not a certain resource, but a pattern to be appended to request URI, if this URI matches web app directory: host/context/sub2 will be extended to host/context/sub2/Welcome.html. So, is it reasonable to change the entry at all?
Similar effect with Refactor / Rename: it changes web.xml entry only when root Welcome.html is renamed, and ignores renamings of other Welcome.htmls.
2. Even for users with the single welcome file the result <welcome-file>../sub3/Welcome.html</welcome-file> is not correct, they need <welcome-file>sub3/Welcome.html</welcome-file>.
Description
Get a web module with the following resource directory:
. resource/Welcome.html.
. resource/sub1/Welcome.html.
. resource/sub2/Welcome.html.
. resource/sub3.
And the entry in WEB_INF/web.xml:
Select resource/Welcome.html, apply Refactor / Move to resource/sub3. See preview, Do refactor.
Refactoring changes web.xml entry to <welcome-file>../sub3/Welcome.html</welcome-file>. Actually this is not correct:
1. welcome-file entry is not a certain resource, but a pattern to be appended to request URI, if this URI matches web app directory: host/context/sub2 will be extended to host/context/sub2/Welcome.html. So, is it reasonable to change the entry at all?
Similar effect with Refactor / Rename: it changes web.xml entry only when root Welcome.html is renamed, and ignores renamings of other Welcome.htmls.
2. Even for users with the single welcome file the result <welcome-file>../sub3/Welcome.html</welcome-file> is not correct, they need <welcome-file>sub3/Welcome.html</welcome-file>.
Some related thoughts: <welcome-file> value could be not resolved as a reference to a file in the file system at all; but 2 inspections may be introduced:
1. If <welcome-file> value does not match any file existing under resource branch, then a warning can be provided for this entry in web.xml.
2. If some directory under resource branch has no any file matching any entry in welcome file list, then an info can be provided for this directory.
Alexander Chernikov - 24 Jan 07 13:24 Some related thoughts: <welcome-file> value could be not resolved as a reference to a file in the file system at all; but 2 inspections may be introduced:
1. If <welcome-file> value does not match any file existing under resource branch, then a warning can be provided for this entry in web.xml.
2. If some directory under resource branch has no any file matching any entry in welcome file list, then an info can be provided for this directory.
1. If <welcome-file> value does not match any file existing under resource branch, then a warning can be provided for this entry in web.xml.
2. If some directory under resource branch has no any file matching any entry in welcome file list, then an info can be provided for this directory.