Examples of urlPatterns()


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

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

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

               webServlet.smallIcon(), webServlet.largeIcon());
      if (descriptionGroup != null)
         servlet.setDescriptionGroup(descriptionGroup);
      servlets.add(servlet);
      metaData.setServlets(servlets);
      if (webServlet.urlPatterns() != null || webServlet.value() != null)
      {
         List<ServletMappingMetaData> servletMappings = new ArrayList<ServletMappingMetaData>();
         ServletMappingMetaData servletMapping = new ServletMappingMetaData();
         servletMapping.setServletName(servletName);
         List<String> urlPatterns = new ArrayList<String>();
View Full Code Here

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

      {
         List<ServletMappingMetaData> servletMappings = new ArrayList<ServletMappingMetaData>();
         ServletMappingMetaData servletMapping = new ServletMappingMetaData();
         servletMapping.setServletName(servletName);
         List<String> urlPatterns = new ArrayList<String>();
         if (webServlet.urlPatterns() != null)
         {
            for (String urlPattern : webServlet.urlPatterns())
            {
               urlPatterns.add(urlPattern);
            }
View Full Code Here

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

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

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

                final String url = info.name;
                for (String servletPath : info.list) {
                    final Class<?> clazz = loadFromUrls(webContext.getClassLoader(), url, servletPath);
                    final WebServlet annotation = clazz.getAnnotation(WebServlet.class);
                    if (annotation != null) {
                        for (String mapping : annotation.urlPatterns()) {
                            try {
                                addServletMethod.invoke(null, clazz.getName(), 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()

            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.WebServlet.urlPatterns()

        }
        webCompDesc.setServlet(true);
        webCompDesc.setWebComponentImplementation(webCompClass.getName());

        if (webCompDesc.getUrlPatternsSet().size() == 0) {
            String[] urlPatterns = webServletAn.urlPatterns();
            if (urlPatterns == null || urlPatterns.length == 0) {
                urlPatterns = webServletAn.value();
            }

            // no url patterns is accepted as it may be defined in top level xml
View Full Code Here

Examples of javax.servlet.annotation.WebServlet.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.WebServlet.urlPatterns()

    String[] patterns = null;

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