Examples of ServletMapping


Examples of org.mortbay.jetty.servlet.ServletMapping

        } else {
            holder = new ServletHolder(servlet);
        }
        servletHandler.addServlet(holder);
       
        ServletMapping mapping = new ServletMapping();
        mapping.setServletName(holder.getName());
        String path = uri.getPath();
       
        if (!path.startsWith("/")) {
            path = '/' + path;
        }
       
        if (!path.startsWith(contextPath)) {
            path = contextPath + path;
       
               
        mapping.setPathSpec(path);
        servletHandler.addServletMapping(mapping);
       
        // Compute the complete URL
        String host;
        try {
View Full Code Here

Examples of org.mortbay.jetty.servlet.ServletMapping

    public void registerServletHolder(ServletHolder servletHolder, String servletName, Set<String> servletMappings, String objectName) throws Exception {
        webAppContext.getServletHandler().addServlet(servletHolder);
        if (servletMappings != null) {
            for (String urlPattern : servletMappings) {
                ServletMapping servletMapping = new ServletMapping();
                servletMapping.setPathSpec(urlPattern);
                servletMapping.setServletName(servletName);
                this.webAppContext.getServletHandler().addServletMapping(servletMapping);
            }
        }
//        LifecycleCommand lifecycleCommand = new LifecycleCommand.StartCommand(servletHolder);
//        lifecycleChain.lifecycleCommand(lifecycleCommand);
View Full Code Here

Examples of org.mortbay.jetty.servlet.ServletMapping

    /* ------------------------------------------------------------ */
    protected void initServletMapping(XmlParser.Node node)
    {
        String servlet_name = node.getString("servlet-name",false,true);
        ServletMapping mapping = new ServletMapping();
        mapping.setServletName(servlet_name);

        ArrayList paths = new ArrayList();
        Iterator iter=node.iterator("url-pattern");
        while(iter.hasNext())
        {
            String p=((XmlParser.Node)iter.next()).toString(false,true);
            p=normalizePattern(p);
            paths.add(p);
        }
        mapping.setPathSpecs((String[])paths.toArray(new String[paths.size()]));

        _servletMappings=LazyList.add(_servletMappings,mapping);
    }
View Full Code Here

Examples of org.mortbay.jetty.servlet.ServletMapping

        if (LazyList.size(paths)>0)
        {
            String jspName=getJSPServletName();
            if (jspName!=null)
            {
                ServletMapping mapping = new ServletMapping();
                mapping.setServletName(jspName);
                mapping.setPathSpecs(LazyList.toStringArray(paths));
                _servletMappings=LazyList.add(_servletMappings,mapping);
            }
        }
    }
View Full Code Here

Examples of org.mortbay.jetty.servlet.ServletMapping

        } else {
            holder = new ServletHolder(servlet);
        }
        servletHandler.addServlet(holder);
       
        ServletMapping mapping = new ServletMapping();
        mapping.setServletName(holder.getName());
        String path = uri.getPath();
       
        if (!path.startsWith("/")) {
            path = '/' + path;
        }
       
        if (!path.startsWith(contextPath)) {
            path = contextPath + path;
       
               
        mapping.setPathSpec(path);
        servletHandler.addServletMapping(mapping);
       
        // Compute the complete URL
        String host;
        try {
View Full Code Here

Examples of org.netbeans.modules.j2ee.dd.api.web.ServletMapping

            }
            return servlet;
        }

        protected ServletMapping addServletMapping(WebApp webApp, String name, String pattern) throws IOException {
            ServletMapping mapping = (ServletMapping) createBean(webApp, "ServletMapping");
            mapping.setServletName(name);
            mapping.setUrlPattern(pattern);
            webApp.addServletMapping(mapping);
           
            return mapping;
        }
View Full Code Here

Examples of webapp.ifaces.ServletMapping

            Main.printPadding( level );
            System.out.println( "Servlet mappings: " );
            System.out.println();
            for ( int i = 0; i < servletMappings.length; i++ )
            {
                final ServletMapping s = servletMappings[ i ];
                Main.printPadding( level + 1 );
                System.out.println( "Servlet name: " + s.getServletName() );
                Main.printPadding( level + 1 );
                System.out.println( "URL pattern: " + s.getUrlPattern() );
                System.out.println();
            }
        }
    }
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.