本文整理汇总了Java中org.glassfish.jersey.server.mvc.jsp.JspMvcFeature类的典型用法代码示例。如果您正苦于以下问题:Java JspMvcFeature类的具体用法?Java JspMvcFeature怎么用?Java JspMvcFeature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JspMvcFeature类属于org.glassfish.jersey.server.mvc.jsp包,在下文中一共展示了JspMvcFeature类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: XbddApplication
import org.glassfish.jersey.server.mvc.jsp.JspMvcFeature; //导入依赖的package包/类
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);
}
});
}
示例2: WebConfig
import org.glassfish.jersey.server.mvc.jsp.JspMvcFeature; //导入依赖的package包/类
public WebConfig() {
packages("fr.maugern.skeleton.web");
register(JspMvcFeature.class);
registerSecurity();
// Tracing support.
property(ServerProperties.TRACING, TracingConfig.ON_DEMAND.name());
}
示例3: RoomServiceUI
import org.glassfish.jersey.server.mvc.jsp.JspMvcFeature; //导入依赖的package包/类
public RoomServiceUI() {
super(RoomPagesResource.class);
register(JspMvcFeature.class);
register(LoggingFilter.class);
property(JspMvcFeature.TEMPLATE_BASE_PATH, "/WEB-INF/pages");
}
示例4: DeviceServiceUI
import org.glassfish.jersey.server.mvc.jsp.JspMvcFeature; //导入依赖的package包/类
public DeviceServiceUI() {
super(DevicePagesResource.class);
register(JspMvcFeature.class);
register(LoggingFilter.class);
property(JspMvcFeature.TEMPLATE_BASE_PATH, "/WEB-INF/pages");
}
示例5: MyApplication
import org.glassfish.jersey.server.mvc.jsp.JspMvcFeature; //导入依赖的package包/类
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());
}
示例6: configure
import org.glassfish.jersey.server.mvc.jsp.JspMvcFeature; //导入依赖的package包/类
@Override
protected Application configure() {
final MyApplication application = new MyApplication();
application.register(JspMvcFeature.class);
application.property(ServletProperties.FILTER_FORWARD_ON_404, true);
return application;
}
示例7: Application
import org.glassfish.jersey.server.mvc.jsp.JspMvcFeature; //导入依赖的package包/类
@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);
}
示例8: PandaJerseyConfig
import org.glassfish.jersey.server.mvc.jsp.JspMvcFeature; //导入依赖的package包/类
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);
}
示例9: ApplicationConfig
import org.glassfish.jersey.server.mvc.jsp.JspMvcFeature; //导入依赖的package包/类
public ApplicationConfig() {
this.packages("enterprisegeeks.rest","enterprisegeeks.rest.resource");
this.register(JspMvcFeature.class);
}