Examples of ServletMapping


Examples of org.eclipse.jetty.servlet.ServletMapping

    private void initializeTextPreprocessorSupport() {
        ServletHolder holder = new ServletHolder(
                new TextPreprocessingHandlerServlet());
        getServletHandler().addServlet(holder);

        ServletMapping map = new ServletMapping();
        map.setServletName(holder.getName());
        map.setPathSpecs(TextPreprocessingHandlerServlet.FILENAME_PATTERNS);
        getServletHandler().addServletMapping(map);
    }
View Full Code Here

Examples of org.eclipse.jetty.servlet.ServletMapping

            return;

        ServletHolder holder = new ServletHolder(new TinyCGIHandlerServlet());
        getServletHandler().addServlet(holder);

        ServletMapping map = new ServletMapping();
        map.setServletName(holder.getName());
        map.setPathSpecs(linkFiles.toArray(new String[linkFiles.size()]));
        try {
            PathMap.setPathSpecSeparators("!");
            getServletHandler().addServletMapping(map);
        } finally {
            PathMap.setPathSpecSeparators(":,");
View Full Code Here

Examples of org.eclipse.jst.j2ee.webapplication.ServletMapping

    if (servletName != null) {
      @SuppressWarnings("unchecked")
      Iterator oldMappings = webApp.getServletMappings().iterator();
     
      while (oldMappings.hasNext()) {
        ServletMapping mapping = (ServletMapping) oldMappings.next();
        if (mapping.getServlet().getServletName().equals(servletName)) {
          webApp.getServletMappings().remove(mapping);
        }
      }
    }
  }
View Full Code Here

Examples of org.eclipse.jst.javaee.web.ServletMapping

     */
    public static void updateServletMappings(final WebApp webApp,
            final Servlet servlet, final String displayName)
    {
        // update mappings for new name
        ServletMapping mapping = findServletMapping(webApp, servlet);
        if (mapping != null)
        {
            mapping.setServletName(displayName);
        }
    }
View Full Code Here

Examples of org.jboss.seam.web.ServletMapping

    @Test
    public void testBasicInPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                
        testNoMatchIn(pattern, "/bar");
        testNoMatchIn(pattern, "/fool");
        testNoMatchIn(pattern, "/foo.seam");
        testNoMatchIn(pattern, "/foo/");
View Full Code Here

Examples of org.jboss.seam.web.ServletMapping

    @Test
    public void testSingleArgInPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                       
        testNoMatchIn(pattern, "/foo");
        testNoMatchIn(pattern, "/foo/bar/baz");
        testNoMatchIn(pattern, "/foo/bar/baz?x=y");
        testNoMatchIn(pattern, "/foo/bar/?x=y");
View Full Code Here

Examples of org.jboss.seam.web.ServletMapping

    @Test
    public void testMultiArgInPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}/{action}");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                             
        testNoMatchIn(pattern, "/foo");
        testNoMatchIn(pattern, "/foo/bar");
        testNoMatchIn(pattern, "/foo/bar/baz/qux");

View Full Code Here

Examples of org.jboss.seam.web.ServletMapping

    @Test
    public void testBasicOutPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                
        testNoMatchOut(pattern, "/bar.seam");
        testNoMatchOut(pattern, "/fool.seam");
        testNoMatchOut(pattern, "/foo");
       
View Full Code Here

Examples of org.jboss.seam.web.ServletMapping

    @Test
    public void testSingleArgOutPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                       
        testNoMatchOut(pattern, "/foo.seam");
        testNoMatchOut(pattern, "/foo.seam?x=y");
        testNoMatchOut(pattern, "/foo.seam/bar");      
        //should this match? 
View Full Code Here

Examples of org.jboss.seam.web.ServletMapping

    @Test
    public void testMultiArgOutPattern()
        throws Exception
    {
        Pattern pattern = new Pattern("/foo.seam", "/foo/{id}/{action}");
        pattern.setViewMapping(new ServletMapping("*.seam"));
                             
        testNoMatchOut(pattern, "/foo.seam");
        testNoMatchOut(pattern, "/foo.seam?id=bar");
        testNoMatchOut(pattern, "/foo.seam?action=baz");

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.