Interface AliasCheck

All Known Implementing Classes:
AllowedResourceAliasChecker, ContextHandler, HttpSpiContextHandler, MovedContextHandler, ResourceHandler.ResourceContext, ServletContextHandler, SymlinkAllowedResourceAliasChecker, TrailingSlashAliasChecker, WebAppContext

public interface AliasCheck
Interface to check aliases.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkAlias(String pathInContext, Resource resource)
    Check if an alias is allowed to be served.
  • Method Details

    • checkAlias

      boolean checkAlias(String pathInContext, Resource resource)
      Check if an alias is allowed to be served. If any AliasCheck returns true then the alias will be allowed to be served, therefore any alias checker should take things like the ContextHandler.getProtectedTargets() and Security Constraints into consideration before allowing a return a value of true.
      Parameters:
      pathInContext - The path the aliased resource was created for.
      resource - The aliased resourced.
      Returns:
      True if the resource is OK to be served.