Search in sources :

Example 6 with Servlet

use of org.apache.openejb.jee.Servlet in project tomee by apache.

the class WsJMXTest method war.

@Module
@Classes({ AnEjbEndpoint.class, AnPojoEndpoint.class })
public WebApp war() {
    final WebApp webapp = new WebApp().contextRoot("app");
    Servlet servlet = new Servlet();
    servlet.setServletName("toto");
    servlet.setServletClass(AnPojoEndpoint.class.getName());
    ServletMapping servletMapping = new ServletMapping();
    servletMapping.setServletName("pojo");
    servletMapping.getUrlPattern().add("/toto");
    webapp.getServlet().add(servlet);
    webapp.getServletMapping().add(servletMapping);
    return webapp;
}
Also used : ServletMapping(org.apache.openejb.jee.ServletMapping) Servlet(org.apache.openejb.jee.Servlet) WebApp(org.apache.openejb.jee.WebApp) Module(org.apache.openejb.testing.Module) Classes(org.apache.openejb.testing.Classes)

Aggregations

Servlet (org.apache.openejb.jee.Servlet)4 HashSet (java.util.HashSet)2 AbsoluteOrdering$JAXB.readAbsoluteOrdering (org.apache.openejb.jee.AbsoluteOrdering$JAXB.readAbsoluteOrdering)2 AbsoluteOrdering$JAXB.writeAbsoluteOrdering (org.apache.openejb.jee.AbsoluteOrdering$JAXB.writeAbsoluteOrdering)2 DataSource$JAXB.readDataSource (org.apache.openejb.jee.DataSource$JAXB.readDataSource)2 DataSource$JAXB.writeDataSource (org.apache.openejb.jee.DataSource$JAXB.writeDataSource)2 EjbLocalRef$JAXB.readEjbLocalRef (org.apache.openejb.jee.EjbLocalRef$JAXB.readEjbLocalRef)2 EjbLocalRef$JAXB.writeEjbLocalRef (org.apache.openejb.jee.EjbLocalRef$JAXB.writeEjbLocalRef)2 EjbRef$JAXB.readEjbRef (org.apache.openejb.jee.EjbRef$JAXB.readEjbRef)2 EjbRef$JAXB.writeEjbRef (org.apache.openejb.jee.EjbRef$JAXB.writeEjbRef)2 Empty$JAXB.readEmpty (org.apache.openejb.jee.Empty$JAXB.readEmpty)2 Empty$JAXB.writeEmpty (org.apache.openejb.jee.Empty$JAXB.writeEmpty)2 EnvEntry$JAXB.readEnvEntry (org.apache.openejb.jee.EnvEntry$JAXB.readEnvEntry)2 EnvEntry$JAXB.writeEnvEntry (org.apache.openejb.jee.EnvEntry$JAXB.writeEnvEntry)2 ErrorPage$JAXB.readErrorPage (org.apache.openejb.jee.ErrorPage$JAXB.readErrorPage)2 ErrorPage$JAXB.writeErrorPage (org.apache.openejb.jee.ErrorPage$JAXB.writeErrorPage)2 Filter$JAXB.readFilter (org.apache.openejb.jee.Filter$JAXB.readFilter)2 Filter$JAXB.writeFilter (org.apache.openejb.jee.Filter$JAXB.writeFilter)2 FilterMapping$JAXB.readFilterMapping (org.apache.openejb.jee.FilterMapping$JAXB.readFilterMapping)2 FilterMapping$JAXB.writeFilterMapping (org.apache.openejb.jee.FilterMapping$JAXB.writeFilterMapping)2