本文整理汇总了Java中org.apache.cxf.transport.servlet.ServletContextResourceResolver类的典型用法代码示例。如果您正苦于以下问题:Java ServletContextResourceResolver类的具体用法?Java ServletContextResourceResolver怎么用?Java ServletContextResourceResolver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ServletContextResourceResolver类属于org.apache.cxf.transport.servlet包,在下文中一共展示了ServletContextResourceResolver类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.apache.cxf.transport.servlet.ServletContextResourceResolver; //导入依赖的package包/类
public void init(ServletConfig sc) throws ServletException {
// Setting this property because otherwise a file named
// "wsdl.properties" will be read from the JRE, which is not possible
// due to restrictive permissions
System.setProperty("javax.wsdl.factory.WSDLFactory", "com.ibm.wsdl.factory.WSDLFactoryImpl");
if (this.bus == null) {
loadBus(sc);
}
loader = bus.getExtension(ClassLoader.class);
ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
resourceManager.addResourceResolver(new ServletContextResourceResolver(sc.getServletContext()));
if (destinationRegistry == null) {
this.destinationRegistry = getDestinationRegistryFromBus(this.bus);
}
this.controller = createServletController(sc);
redirectList = parseListSequence(sc.getInitParameter(REDIRECTS_PARAMETER));
redirectQueryCheck = Boolean.valueOf(sc.getInitParameter(REDIRECT_QUERY_CHECK_PARAMETER));
dispatcherServletName = sc.getInitParameter(REDIRECT_SERVLET_NAME_PARAMETER);
dispatcherServletPath = sc.getInitParameter(REDIRECT_SERVLET_PATH_PARAMETER);
}
示例2: updateAvailableBusWithServletInfo
import org.apache.cxf.transport.servlet.ServletContextResourceResolver; //导入依赖的package包/类
private void updateAvailableBusWithServletInfo(ServletConfig servletConfig)
{
BusHolder holder = endpoint.getService().getDeployment().getAttachment(BusHolder.class);
//set the bus from deployment into the CXF servlet and assign it to the current thread (do not touch the default bus!)
bus = holder.getBus();
BusFactory.setThreadDefaultBus(bus);
//update the resource manager adding the ServletContextResourceResolver that was to be added by CXF servlet
ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
resourceManager.addResourceResolver(new ServletContextResourceResolver(servletConfig.getServletContext()));
}
示例3: afterPropertiesSet
import org.apache.cxf.transport.servlet.ServletContextResourceResolver; //导入依赖的package包/类
@Override
public void afterPropertiesSet() throws Exception {
this.bus.getExtension(ResourceManager.class).addResourceResolver(new ServletContextResourceResolver(this.servletConfig.getServletContext()));
this.servletController =
new ServiceServletController(((HTTPTransportFactory) this.bus.getExtension(DestinationFactoryManager.class).getDestinationFactoryForUri(
HTTPTransportFactory.DEFAULT_NAMESPACES.get(0))).getRegistry());
}