Examples of urlPatterns()


Examples of javax.servlet.annotation.WebFilter.urlPatterns()

            WebInitParam[] params = annotation.initParams();
            for (int i = 0; i < params.length; i++) {
                wrapper.addInitParameter(params[i].name(), params[i].value());
            }
            context.addChild(wrapper);
            String[] urlPatterns = annotation.urlPatterns();
            if (urlPatterns != null) {
                for (int i = 0; i < urlPatterns.length; i++) {
                    context.addServletMapping(urlPatterns[i], annotation.name());
                }
            }
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.urlPatterns()

            servletFilterMappingDesc.setName(filterName);
            webBundleDesc.addServletFilterMapping(servletFilterMappingDesc);
        }

        if (!hasUrlPattern) {
            String[] urlPatterns = webFilterAn.urlPatterns();
            if (urlPatterns == null || urlPatterns.length == 0) {
                urlPatterns = webFilterAn.value();
            }

            // accept here as url patterns may be defined in top level xml
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.urlPatterns()

                filterDef.addInitParameter(params[i].name(), params[i].value());
            }
            context.addFilterDef(filterDef);
            FilterMap filterMap = new FilterMap();
            filterMap.setFilterName(filterName);
            String[] urlPatterns = annotation.urlPatterns();
            if (urlPatterns != null) {
                for (int i = 0; i < urlPatterns.length; i++) {
                    filterMap.addURLPattern(urlPatterns[i]);
                }
            }
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.urlPatterns()

            WebInitParam[] params = annotation.initParams();
            for (int i = 0; i < params.length; i++) {
                wrapper.addInitParameter(params[i].name(), params[i].value());
            }
            context.addChild(wrapper);
            String[] urlPatterns = annotation.urlPatterns();
            if (urlPatterns != null) {
                for (int i = 0; i < urlPatterns.length; i++) {
                    context.addServletMapping(urlPatterns[i], annotation.name());
                }
            }
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.urlPatterns()

        }
      }
    } else {
      WebFilter filter = getClass().getAnnotation(WebFilter.class);
      if (filter != null) {
        if (filter.urlPatterns().length > 0) {
          patterns = filter.urlPatterns();
        } else {
          patterns = filter.value()
        }
      }
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.urlPatterns()

      }
    } else {
      WebFilter filter = getClass().getAnnotation(WebFilter.class);
      if (filter != null) {
        if (filter.urlPatterns().length > 0) {
          patterns = filter.urlPatterns();
        } else {
          patterns = filter.value()
        }
      }
    }
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.urlPatterns()

                        for (WebInitParam param : annotation.initParams()) {
                            initParams.put(param.name(), param.value());
                        }

                        final FilterConfig config = new SimpleFilterConfig(sce.getServletContext(), info.name, initParams);
                        for (String mapping: annotation.urlPatterns()) {
                            try {
                                addFilterMethod.invoke(null, classname, webContext, mapping, config);
                                deployedWebObjects.filterMappings.add(mapping);
                            } catch (Exception e) {
                                LOGGER.warning(e.getMessage(), e);
View Full Code Here

Examples of javax.servlet.annotation.WebFilter.urlPatterns()

                    String classname = nameFromUrls(url, servletPath);

                    final Class<?> clazz = webContext.getClassLoader().loadClass(classname);
                    final WebServlet annotation = clazz.getAnnotation(WebServlet.class);
                    if (annotation != null) {
                        for (String mapping: annotation.urlPatterns()) {
                            try {
                                addServletMethod.invoke(null, classname, webContext, mapping);
                                deployedWebObjects.mappings.add(mapping);
                            } catch (Exception e) {
                                LOGGER.warning(e.getMessage(), e);
View Full Code Here

Examples of javax.servlet.annotation.WebServlet.urlPatterns()

          for (String value : webServlet.value()) {
            mapping.addURLPattern(value);
          }
         
          for (String value : webServlet.urlPatterns()) {
            mapping.addURLPattern(value);
          }
         
          mapping.setBean(bean);
       
View Full Code Here

Examples of javax.servlet.annotation.WebServlet.urlPatterns()

    if (isServlet)
    {
      WebServlet servlet = getClass().getAnnotation(WebServlet.class);
      if (servlet != null)
      {
        if (servlet.urlPatterns().length > 0)
        {
          patterns = servlet.urlPatterns();
        }
        else
        {
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.