code: private String getWelcomeFile(String pathInContext) throws MalformedURLException, IOException {
  
  		if (welcomes == null) {
  			return null;
  		}
  
  		if (!pathInContext.endsWith("/")) {
  			pathInContext = pathInContext + "/";
  		}
  		if (!"default".equals(name) && pathInContext.startsWith(name)) {
  			// in Tomcat, welcome-files registered in HttpService directly, with non-default resource servlet
  		}
  		for (int i = 0; i < welcomes.length; i++) {
  			if (httpContext.getResource(pathInContext + welcomes[i]) != null) {
  				return pathInContext + welcomes[i];
  			}
  		}
  		return null;
  	}
docs: Finds a matching welcome file for the supplied {@link Resource}. This
  will be the first entry in the list of configured {@link #_welcomes
  welcome files} that existing within the directory referenced by the
  <code>Resource</code>. If the resource is not a directory, or no matching
  file is found, then it may look for a valid servlet mapping. If there is
  none, then <code>null</code> is returned. The list of welcome files is
  read from the {@link ContextHandler} for this servlet, or
  <code>"index.jsp" , "index.html"</code> if that is <code>null</code>.
  
  @param resource
  @return The path of the matching welcome file in context or null.
  @throws IOException
  @throws MalformedURLException