Examples of PathMap

  • org.mortbay.jetty.servlet.PathMap
    URI path map to Object. This mapping implements the path specification recommended in the 2.2 Servlet API. Path specifications can be of the following forms:
     /foo/bar           - an exact path specification. /foo/*             - a prefix path specification (must end '/*'). *.ext              - a suffix path specification. /                  - the default path specification.        
    Matching is performed in the following order
  • Exact match.
  • Longest prefix match.
  • Longest suffix match.
  • default. Multiple path specifications can be mapped by providing a list of specifications. The list is separated by the characters specified in the "org.mortbay.http.PathMap.separators" System property, which defaults to :

    Special characters within paths such as '?� and ';' are not treated specially as it is assumed they would have been either encoded in the original URL or stripped from the path.

    This class is not synchronized for get's. If concurrent modifications are possible then it should be synchronized at a higher level. @author Greg Wilkins (gregw)

  • org.openqa.jetty.http.PathMap
    URI path map to Object. This mapping implements the path specification recommended in the 2.2 Servlet API. Path specifications can be of the following forms:
     /foo/bar           - an exact path specification. /foo/*             - a prefix path specification (must end '/*'). *.ext              - a suffix path specification. /                  - the default path specification.        
    Matching is performed in the following order
  • Exact match.
  • Longest prefix match.
  • Longest suffix match.
  • default. Multiple path specifications can be mapped by providing a list of specifications. The list is separated by the characters specified in the "org.openqa.jetty.http.PathMap.separators" System property, which defaults to :

    Note that this is a very different mapping to that provided by PathMap in Jetty2.

    This class is not synchronized for get's. If concurrent modifications are possible then it should be synchronized at a higher level. @version $Id: PathMap.java,v 1.25 2005/08/13 00:01:24 gregwilkins Exp $ @author Greg Wilkins (gregw)

  • org.pdf4j.saxon.expr.PathMap
    b.research.bell-labs.com/user/simeon/xml_projection.pdf">A. Marian and J. Simeon, Projecting XML Documents, VLDB 2003.


  • Examples of org.mortbay.jetty.servlet.PathMap

            // data structure which maps a request to a context
            // each match is called in turn until the request is handled
            // { context path =>
            //     { virtual host => context }
            // }
      PathMap map = _contextMap;
      if (map!=null && target!=null && target.startsWith("/"))
      {
                // first, get all contexts matched by context path
          Object contexts = map.getLazyMatches(target);

                for (int i=0; i<LazyList.size(contexts); i++)
                {
                    // then, match against the virtualhost of each context
                    Map.Entry entry = (Map.Entry)LazyList.get(contexts, i);
    View Full Code Here

    Examples of org.mortbay.jetty.servlet.PathMap

        public void addRewriteRule(String pattern, String prefix)
        {
            if (pattern==null || pattern.length()==0 || !pattern.startsWith("/"))
                throw new IllegalArgumentException();
            if (_rewrite==null)
                _rewrite=new PathMap(true);
            _rewrite.put(pattern,prefix);
        }
    View Full Code Here

    Examples of org.mortbay.jetty.servlet.PathMap

           
            _out = _fileOut;
           
            if (_ignorePaths != null && _ignorePaths.length > 0)
            {
                _ignorePathMap = new PathMap();
                for (int i = 0; i < _ignorePaths.length; i++)
                    _ignorePathMap.put(_ignorePaths[i], _ignorePaths[i]);
            }
            else
                _ignorePathMap = null;
    View Full Code Here

    Examples of org.mortbay.jetty.servlet.PathMap

        /**
         * Remap the context paths.
         */
        public void mapContexts()
        {
            PathMap contextMap = new PathMap();
            Handler[] branches = getHandlers();
           
           
            for (int b=0;branches!=null && b<branches.length;b++)
            {
                Handler[] handlers=null;
               
                if (branches[b] instanceof ContextHandler)
                {
                    handlers = new Handler[]{ branches[b] };
                }
                else if (branches[b] instanceof HandlerContainer)
                {
                    handlers = ((HandlerContainer)branches[b]).getChildHandlersByClass(ContextHandler.class);
                }
                else
                    continue;
               
                for (int i=0;i<handlers.length;i++)
                {
                    ContextHandler handler=(ContextHandler)handlers[i];

                    String contextPath=handler.getContextPath();

                    if (contextPath==null || contextPath.indexOf(',')>=0 || contextPath.startsWith("*"))
                        throw new IllegalArgumentException ("Illegal context spec:"+contextPath);

                    if(!contextPath.startsWith("/"))
                        contextPath='/'+contextPath;

                    if (contextPath.length()>1)
                    {
                        if (contextPath.endsWith("/"))
                            contextPath+="*";
                        else if (!contextPath.endsWith("/*"))
                            contextPath+="/*";
                    }

                    Object contexts=contextMap.get(contextPath);
                    String[] vhosts=handler.getVirtualHosts();

                   
                    if (vhosts!=null && vhosts.length>0)
                    {
                        Map hosts;

                        if (contexts instanceof Map)
                            hosts=(Map)contexts;
                        else
                        {
                            hosts=new HashMap();
                            hosts.put("*",contexts);
                            contextMap.put(contextPath, hosts);
                        }

                        for (int j=0;j<vhosts.length;j++)
                        {
                            String vhost=vhosts[j];
                            contexts=hosts.get(vhost);
                            contexts=LazyList.add(contexts,branches[b]);
                            hosts.put(vhost,contexts);
                        }
                    }
                    else if (contexts instanceof Map)
                    {
                        Map hosts=(Map)contexts;
                        contexts=hosts.get("*");
                        contexts= LazyList.add(contexts, branches[b]);
                        hosts.put("*",contexts);
                    }
                    else
                    {
                        contexts= LazyList.add(contexts, branches[b]);
                        contextMap.put(contextPath, contexts);
                    }
                }
            }
            _contextMap=contextMap;

    View Full Code Here

    Examples of org.mortbay.jetty.servlet.PathMap

            // data structure which maps a request to a context
            // each match is called in turn until the request is handled
            // { context path =>
            //     { virtual host => context }
            // }
      PathMap map = _contextMap;
      if (map!=null && target!=null && target.startsWith("/"))
      {
                // first, get all contexts matched by context path
          Object contexts = map.getLazyMatches(target);

                for (int i=0; i<LazyList.size(contexts); i++)
                {
                    // then, match against the virtualhost of each context
                    Map.Entry entry = (Map.Entry)LazyList.get(contexts, i);
    View Full Code Here

    Examples of org.mortbay.jetty.servlet.PathMap

        public void addRewriteRule(String pattern, String prefix)
        {
            if (pattern==null || pattern.length()==0 || !pattern.startsWith("/"))
                throw new IllegalArgumentException();
            if (_rewrite==null)
                _rewrite=new PathMap(true);
            _rewrite.put(pattern,prefix);
        }
    View Full Code Here

    Examples of org.openqa.jetty.http.PathMap

                while(i2.hasNext())
                {
                    Map.Entry hEntry=(Map.Entry)(i2.next());
                    String host=(String)hEntry.getKey();

                    PathMap contexts=(PathMap)hEntry.getValue();
                    Iterator i3=contexts.entrySet().iterator();
                    while(i3.hasNext())
                    {
                        Map.Entry cEntry=(Map.Entry)(i3.next());
                        String contextPath=(String)cEntry.getKey();
                        java.util.List contextList=(java.util.List)cEntry.getValue();
    View Full Code Here

    Examples of org.pdf4j.saxon.expr.PathMap

                if (!exp.usesContextItem()) {
                    System.err.println("Source document ignored - query does not access the context item");
                    sourceInput = null;

                } else if (projection) {
                    PathMap map = exp.getPathMap();
                    PathMap.PathMapRoot contextRoot = map.getContextRoot();
                    if (explain) {
                        System.err.println("DOCUMENT PROJECTION: PATH MAP");
                        map.diagnosticDump(System.err);
                    }
                    if (contextRoot != null) {
                        if (contextRoot.hasUnknownDependencies()) {
                            System.err.println("Document projection for the context document is not possible, " +
                                    "because the query uses paths that defy analysis");
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. All rights reserved.
    All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.