Class ApproveAbsolutePathAliases

  • All Implemented Interfaces:
    org.eclipse.jetty.server.handler.ContextHandler.AliasCheck

    public class ApproveAbsolutePathAliases
    extends Object
    implements org.eclipse.jetty.server.handler.ContextHandler.AliasCheck
    In certain Spring MVC pages, duplicate slashes are added to the URLs, leading to aliases of the form: /opt/opennms/jetty-webapps/opennms/WEB-INF/jsp/support/index.jsp with resources of the form: /opt/opennms/jetty-webapps/opennms/WEB-INF/jsp//support/index.jsp This ContextHandler.AliasCheck will approve paths, if the resource points to a file, and the absolute path of the file matches the alias.
    Author:
    jwhite
    • Constructor Detail

      • ApproveAbsolutePathAliases

        public ApproveAbsolutePathAliases()
    • Method Detail

      • check

        public boolean check​(String path,
                             org.eclipse.jetty.util.resource.Resource resource)
        Specified by:
        check in interface org.eclipse.jetty.server.handler.ContextHandler.AliasCheck