怎样让resin支持OTA方式?

来源:百度知道 编辑:UC知道 时间:2024/07/08 17:09:10
apache下面的方法我知道,现在用resin做服务器,打开的时候,模拟器提示说: the application file(.jad) for OTA test does not appear to be the correct type.....
有请诸位高手指点下如何resin支持OTA方式?

几个可能会引起错误的地方:

1.下载连接应该指向jad文件而不是jar文件

2.jad文件的mime类型必须为:text/vnd.sun.j2me.app-descriptor(不过看你的MIDP设备上既然能解析出各个属性,应该是正确的)

3.在OTA响应请求时必须显式的指明采用UTF-8格式
String mimeType = ctx.getMimeType(jadName);
// OTA Provisioning: default encoding is UTF8
response.setContentType(mimeType + "; charset=utf-8");

应该不行吧?