前天发表了一篇DWR+OSGi整合的文章,那篇文章对DWR+OSGi的整合还不是很完善,现在这里提供一种比较完善的方法。也算是对上篇后面提出问题的解答。
  在这之前,都还是建立在要修改dwr.jar源码的基础上。这个版本,可以在不修改dwr.jar的基础上进行。这样可以很方便地升级dwr,对于使用者也减少了很多的工作量。好了,让我们去看一看:

  首先,创建一个普通的Plug-in工程。建个lib目录,导入用到的jar文件。然后修改启动文件Activator.java。与上一篇《MANIFEST.MF文件,添加DWR-AJAX: /USYS-INF/dwr.xml,/USYS-INF/testAjax.xml

  这里,testAjax.xml是我们的测试文件,可以添加N个DWR的配置文件,以,隔开。当然,可以分布在不同的Bundle里面了。测试文件自己编写。
[原创]DWR+OSGi整合v2.02007-9-19 10:39:19 org.directwebremoting.util.CommonsLoggingOutput info
[原创]DWR+OSGi整合v2.0信息: DWR Version 
2.0.1 starting.
[原创]DWR+OSGi整合v2.0
2007-9-19 10:39:19 org.directwebremoting.util.CommonsLoggingOutput info
[原创]DWR+OSGi整合v2.0信息: - Servlet Engine: Equinox HttpService/
1.0
[原创]DWR+OSGi整合v2.0
2007-9-19 10:39:19 org.directwebremoting.util.CommonsLoggingOutput info
[原创]DWR+OSGi整合v2.0信息: - Java Version:   
1.5.0_12
[原创]DWR+OSGi整合v2.0
2007-9-19 10:39:19 org.directwebremoting.util.CommonsLoggingOutput info
[原创]DWR+OSGi整合v2.0信息: - Java Vendor:    Sun Microsystems Inc.
[原创]DWR+OSGi整合v2.0/ajax/about>>>>>>>>>>>>>>>>>>>
[原创]DWR+OSGi整合v2.0
===================================
[原创]DWR+OSGi整合v2.0<html><head><title>DWR - Easy Ajax for Java</title></head><body><h1 style
='font-size:100%;font-weight:normal;'>This site is using <a href='http://getahead.org/dwr'>DWR - Easy Ajax for Java</a>.</body></html>
[原创]DWR+OSGi整合v2.0
===================================

相关文章:

  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
  • 2021-09-19
  • 2021-05-23
  • 2022-12-23
  • 2022-01-04
猜你喜欢
  • 2022-12-23
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
相关资源
相似解决方案