惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
Vercel News
Vercel News
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
H
Help Net Security
罗磊的独立博客
The Cloudflare Blog
J
Java Code Geeks
博客园 - 叶小钗
I
InfoQ
B
Blog
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
月光博客
月光博客
博客园_首页
雷峰网
雷峰网
M
MIT News - Artificial intelligence
博客园 - 【当耐特】
美团技术团队
T
The Blog of Author Tim Ferriss
博客园 - 司徒正美

博客园 - YCOE

MongoDB异常关闭引起的CPU占用 linux php 安装openssl备忘 yum Segmentation fault 错误处理 storytlr -- 安装体验 FullCalendar的二次开发、扩展 记一次笔记本CPU性能骤降 [原创]狂想--QQ构架 [原创]基于jquery.Jcrop的头像编辑器 [原创][C#] 如何将String类型转换成任意基本类型 [原创]Annotation之ElementType.PACKAGE 短信切割算法 Log4net的使用 C# Unrecognized configuration section system.serviceModel 发现Google浏览器(Chrome)的一个JavaScript Bug DWR死锁问题解决 [原创]DWR与OSGi的整合 [转载]使用java.text包格式化数字和日期 Hibernate merge方法 MySQL数据库使用Innodb数据库类型(工具生成Hibernate+Spring代码)
[原创]DWR+OSGi整合v2.0
YCOE · 2007-09-19 · via 博客园 - YCOE

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

  首先,创建一个普通的Plug-in工程。建个lib目录,导入用到的jar文件。然后修改启动文件Activator.java。与上一篇《[原创]DWR与OSGi的整合》一样。然后再创建DWR-AJAX目录,把dwr.jar\org\directwebremoting 里面的dwr.xml文件拷到此目录。再次,创建一个DwrLoador.java,源代码也与《[原创]DWR与OSGi的整合》一模一样。好了,再配置一下项目的MANIFEST.MF文件,添加DWR-AJAX: /USYS-INF/dwr.xml,/USYS-INF/testAjax.xml

  这里,testAjax.xml是我们的测试文件,可以添加N个DWR的配置文件,以,隔开。当然,可以分布在不同的Bundle里面了。测试文件自己编写。

2007-9-19 10:39:19 org.directwebremoting.util.CommonsLoggingOutput info
信息: DWR Version 
2.0.1 starting.
2007-9-19 10:39:19 org.directwebremoting.util.CommonsLoggingOutput info
信息: - Servlet Engine: Equinox HttpService/
1.0
2007-9-19 10:39:19 org.directwebremoting.util.CommonsLoggingOutput info
信息: - Java Version:   
1.5.0_12
2007-9-19 10:39:19 org.directwebremoting.util.CommonsLoggingOutput info
信息: - Java Vendor:    Sun Microsystems Inc.
/ajax/about>>>>>>>>>>>>>>>>>>>
===================================
<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>
===================================