Package javax.servlet

Examples of javax.servlet.ServletRegistration.addMapping()


    public void contextInitialized(ServletContextEvent sce) {
        ServletContext sc = sce.getServletContext();
        // Regist servlet
        ServletRegistration sr = sc.addServlet("ClassViewer",
                "org.apache.geronimo.testsuite.servlet3.app.CViewerServlet");
        sr.addMapping("/ClassViewer");

        // Register Filter
        FilterRegistration fr = sc.addFilter("CViewerFilter",
                "org.apache.geronimo.testsuite.servlet3.app.CviewerFilter");
        fr.addMappingForServletNames(EnumSet.of(DispatcherType.REQUEST), true,
View Full Code Here


        for (Class tc : classes) {
            System.out.println(tc.getName());
        }
       
        ServletRegistration reg = ctx.addServlet("testAdd", AddedServletOnStartup.class);
        reg.addMapping("/add");
    }
}
View Full Code Here

      ServletRegistration facesServletRegistration = getFacesServletRegistration(servletContext);
      if (facesServletRegistration != null) {
          Collection<String> mappings = facesServletRegistration.getMappings();
          for (String extension : extensions) {
              if (!mappings.contains(extension)) {
                  facesServletRegistration.addMapping(extension);
              }
          }
      }
  }
View Full Code Here

                }
            }
            ServletRegistration reg =
                  servletContext.addServlet("FacesServlet",
                                            "javax.faces.webapp.FacesServlet");
            reg.addMapping("/faces/*", "*.jsf", "*.faces");
            servletContext.setAttribute(RIConstants.FACES_INITIALIZER_MAPPINGS_ADDED, Boolean.TRUE);


            // The following line is temporary until we can solve an ordering
            // issue in V3.  Right now the JSP container looks for a mapping
View Full Code Here

                           "Registering FacesServlet with mappings '/faces/*', '*.jsf', and '*.faces'.");
            }
            ServletRegistration reg =
                  servletContext.addServlet("FacesServlet",
                                            "javax.faces.webapp.FacesServlet");
            reg.addMapping("/faces/*", "*.jsf", "*.faces");
            servletContext.setAttribute(RIConstants.FACES_INITIALIZER_MAPPINGS_ADDED, Boolean.TRUE);

            // The following line is temporary until we can solve an ordering
            // issue in V3.  Right now the JSP container looks for a mapping
            // of the FacesServlet in the web.xml.  If it's not present, then
View Full Code Here

                    registration = context.addServlet(servletInstance.getClass().getName(), servletInstance);
                } else {
                    registration = context.addServlet(servletClass.getName(), servletClass);
                }
                registration.setInitParameters(deploymentContext.getInitParams());
                registration.addMapping(servletPathLocal);
            }

            for (final Class<? extends EventListener> eventListener : deploymentContext.getListeners()) {
                context.addListener(eventListener);
            }
View Full Code Here

                }
            }
            ServletRegistration reg =
                  servletContext.addServlet("FacesServlet",
                                            "javax.faces.webapp.FacesServlet");
            reg.addMapping("/faces/*", "*.jsf", "*.faces");
            servletContext.setAttribute(RIConstants.FACES_INITIALIZER_MAPPINGS_ADDED, Boolean.TRUE);

            // The following line is temporary until we can solve an ordering
            // issue in V3.  Right now the JSP container looks for a mapping
            // of the FacesServlet in the web.xml.  If it's not present, then
View Full Code Here

                }
            }
            ServletRegistration reg =
                  servletContext.addServlet("FacesServlet",
                                            "javax.faces.webapp.FacesServlet");
            reg.addMapping("/faces/*", "*.jsf", "*.faces");
            servletContext.setAttribute(RIConstants.FACES_INITIALIZER_MAPPINGS_ADDED, Boolean.TRUE);

            // The following line is temporary until we can solve an ordering
            // issue in V3.  Right now the JSP container looks for a mapping
            // of the FacesServlet in the web.xml.  If it's not present, then
View Full Code Here

                }
            }
            ServletRegistration reg =
                  servletContext.addServlet("FacesServlet",
                                            "javax.faces.webapp.FacesServlet");
            reg.addMapping("/faces/*", "*.jsf", "*.faces");
            servletContext.setAttribute(RIConstants.FACES_INITIALIZER_MAPPINGS_ADDED, Boolean.TRUE);

            // The following line is temporary until we can solve an ordering
            // issue in V3.  Right now the JSP container looks for a mapping
            // of the FacesServlet in the web.xml.  If it's not present, then
View Full Code Here

                }
            }
            ServletRegistration reg =
                  servletContext.addServlet("FacesServlet",
                                            "javax.faces.webapp.FacesServlet");
            reg.addMapping("/faces/*", "*.jsf", "*.faces");
            servletContext.setAttribute(RIConstants.FACES_INITIALIZER_MAPPINGS_ADDED, Boolean.TRUE);


            // The following line is temporary until we can solve an ordering
            // issue in V3.  Right now the JSP container looks for a mapping
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.