Esempio n. 1
0
 private ServletPathMatch findWelcomeServlet(final String path, boolean requiresRedirect) {
   for (String i : welcomePages) {
     String mergedPath = path + i;
     final ServletPathMatch handler = data.getServletHandlerByPath(mergedPath);
     if (handler != null && !handler.isRequiredWelcomeFileMatch()) {
       return new ServletPathMatch(
           handler.getServletChain(),
           handler.getMatched(),
           handler.getRemaining(),
           requiresRedirect ? REDIRECT : REWRITE,
           i);
     }
   }
   return null;
 }
Esempio n. 2
0
 private ServletPathMatch findWelcomeFile(final String path, boolean requiresRedirect) {
   for (String i : welcomePages) {
     try {
       String mergedPath = path + i;
       Resource resource = resourceManager.getResource(mergedPath);
       if (resource != null) {
         final ServletPathMatch handler = data.getServletHandlerByPath(mergedPath);
         return new ServletPathMatch(
             handler.getServletChain(),
             mergedPath,
             null,
             requiresRedirect ? REDIRECT : REWRITE,
             i);
       }
     } catch (IOException e) {
     }
   }
   return null;
 }