想要使用CAMEL,CXF和Karaf访问静态资源 [英] Want to access static resource using CAMEL, CXF and Karaf

查看:156
本文介绍了想要使用CAMEL,CXF和Karaf访问静态资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是CAMEL,CXF和Karaf的新手. 我想使用带有CXF和KARAF的CAMEL访问静态文件. 想知道做到这一点的最佳方法. 我通过net搜索,发现基于CXF的其余Web服务可以用相同的方式编写. 还有其他更简单的方法吗? 我们正在使用jboss FUSE服务器.

I am new to CAMEL, CXF and Karaf. I want to access static file using CAMEL with CXF and KARAF. Wanted to know the best way to do that. I have searched through net and found that CXF based rest web service can be written for the same. Is there any other simpler way for this. We are using jboss FUSE server.

推荐答案

有一种更好的方法来做到这一点.

Got a better way to do the same.

  1. 第1步 在您的Maven插件中添加< _wab> src/main/webapp/标签,以便您的捆绑包可以被karaf容器视为WAB. 使用和声明您的自定义上下文路径. 默认情况下,maven将Bundle-SymbolicName作为上下文.
  2. 第2步. 编写web.xml.将其放在/src/main/webapp/WEB-INF下.
  3. 第3步. 将您的静态资源文件放置在webapp文件夹下.
  4. 第4步. 使用maven命令mvn clean install生成代码以生成捆绑罐,然后将罐子部署到karaf中.
  5. 第5步 使用下面的链接访问静态资源. http://:8181//
  1. Step 1 Add <_wab>src/main/webapp/ tag in you maven pluggin so that your bundle can be treated as WAB by karaf container. Use and to declare your custom context path. By default maven will take Bundle-SymbolicName as context.
  2. Step 2. Write web.xml. Place it under /src/main/webapp/WEB-INF.
  3. Step 3. Place your static resource file under webapp folder.
  4. Step 4. Build the code to generate bundle jar using maven command mvn clean install and deploy the jar in karaf
  5. Step 5 Use below link to access the static resource. http://:8181//

这篇关于想要使用CAMEL,CXF和Karaf访问静态资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆