public XbddApplication() { packages(getClass().getPackage().getName()); // MVC feature property(JspMvcFeature.TEMPLATE_BASE_PATH, "/WEB-INF/jsp"); register(JspMvcFeature.class); register(MultiPartFeature.class); // Logging. // register(LoggingFilter.class); property(ServerProperties.TRACING, TracingConfig.ON_DEMAND.name()); register(new AbstractBinder() { @Override protected void configure() { bindFactory(ServletContextMongoClientFactory.class).to(MongoDBAccessor.class).in(Singleton.class); } }); }
public WebConfig() { packages("fr.maugern.skeleton.web"); register(JspMvcFeature.class); registerSecurity(); // Tracing support. property(ServerProperties.TRACING, TracingConfig.ON_DEMAND.name()); }
public RoomServiceUI() { super(RoomPagesResource.class); register(JspMvcFeature.class); register(LoggingFilter.class); property(JspMvcFeature.TEMPLATE_BASE_PATH, "/WEB-INF/pages"); }
public DeviceServiceUI() { super(DevicePagesResource.class); register(JspMvcFeature.class); register(LoggingFilter.class); property(JspMvcFeature.TEMPLATE_BASE_PATH, "/WEB-INF/pages"); }
public MyApplication() { // Resources. packages(Bookstore.class.getPackage().getName()); // MVC. register(JspMvcFeature.class); // Logging. register(LoggingFilter.class); // Tracing support. property(ServerProperties.TRACING, TracingConfig.ON_DEMAND.name()); }
@Override protected Application configure() { final MyApplication application = new MyApplication(); application.register(JspMvcFeature.class); application.property(ServletProperties.FILTER_FORWARD_ON_404, true); return application; }
@Inject public Application(ServletContext context) { ConfigReader config = new ConfigReader(context); final CouchDbConnector connector = new CouchDbConnectorFactory() .createConnector(config.get(Key.COUCHDB_URL), config .get(Key.COUCHDB_DB_NAME), Integer.parseInt(config .get(Key.COUCHDB_MAX_CONNECTIONS)), config .get(Key.COUCHDB_USERNAME), config .get(Key.COUCHDB_PASSWORD)); ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); final Validator validator = factory.getValidator(); register(new AbstractBinder() { @Override protected void configure() { bind(validator).to(Validator.class); bind(connector).to(CouchDbConnector.class); bind(CouchDbStatementRepository.class).to( StatementRepository.class).in(Singleton.class); bind(StatementParserImpl.class).to(StatementParser.class); bind(StatementPrinterImpl.class).to(StatementPrinter.class); bind(QueryResolver.class).to(IQueryResolver.class); } }); register(CORSResponseFilter.class); register(VersionRequestFilter.class); register(JspMvcFeature.class); register(WelcomeController.class); register(AgentStringReaderProvider.class); register(MultiExceptionMapper.class); register(IllegalArgumentExceptionMapper.class); register(DateParamConverterProvider.class); register(StatementsResource.class); register(AboutResource.class); register(JacksonJsonProvider.class); }
public PandaJerseyConfig() throws JAXBException { packages("de.fuberlin.panda.api.jersey"); setApplicationName("PANDA"); // Load Resource Map JAXBContext jaxbContext = JAXBContext.newInstance(ResourceMap.class); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); File configFile = new File(pandaSettings.getResourceConfFilePath()); pandaSettings.setResourceMap((ResourceMap) unmarshaller.unmarshal(configFile)); // create default settings register(new AbstractBinder() { @Override protected void configure() { bind(pandaSettings); } }); // register class for JSON support this.register(JacksonFeature.class); // register JSP support this.register(JspMvcFeature.class); this.property(MvcFeature.TEMPLATE_BASE_PATH, "/WEB-INF/jsp"); // Custom JAXB marshaller provider this.register(JaxbMarshallerProvider.class); // Custom Jackson ObjectMapper provider this.register(JacksonObjectMapperProvider.class); }
public ApplicationConfig() { this.packages("enterprisegeeks.rest","enterprisegeeks.rest.resource"); this.register(JspMvcFeature.class); }