Add a welcome file to the given context. @param hostName The host where the given context can be found @param contextPath The path of the given context @param version The version of the given context @param welcomeFile The welcome file to add
(String hostName, String contextPath, String version, String welcomeFile)
| 612 | * @param welcomeFile The welcome file to add |
| 613 | */ |
| 614 | public void addWelcomeFile(String hostName, String contextPath, String version, String welcomeFile) { |
| 615 | hostName = renameWildcardHost(hostName); |
| 616 | ContextVersion contextVersion = findContextVersion(hostName, contextPath, version, false); |
| 617 | if (contextVersion == null) { |
| 618 | return; |
| 619 | } |
| 620 | int len = contextVersion.welcomeResources.length + 1; |
| 621 | String[] newWelcomeResources = new String[len]; |
| 622 | System.arraycopy(contextVersion.welcomeResources, 0, newWelcomeResources, 0, len - 1); |
| 623 | newWelcomeResources[len - 1] = welcomeFile; |
| 624 | contextVersion.welcomeResources = newWelcomeResources; |
| 625 | } |
| 626 | |
| 627 | |
| 628 | /** |
nothing calls this directly
no test coverage detected