Tomcat服务OTA发布J2ME应用(eclipse开发环境)

a.部署Tomcat和wtk;


b.在tomcat下conf/web.xml增加:
       <mime-mapping> 
        <extension>jad</extension> 
        <mime-type>text/vnd.sun.J2ME.app-descriptor</mime-type> 
       </mime-mapping>
       <mime-mapping> 
        <extension>jar</extension> 
        <mime-type>application/java-archive</mime-type> 
       </mime-mapping>


c.eclipse开发j2me程序后,将deployed文件夹下的demo.jad和demo.jar部署到tomcat:
       方法一:新增web服务,在webcontent下创建j2medemo文件夹,
               然后将demo.jad和demo.jar拷贝进去,最后部署web服务到tomcat;
       方法二:直接存放在webapps/ROOT目录下,在该目录下创建j2medemo文件夹,
               将demo.jad和demo.jar拷贝进去即可;


 d.发布down.WML页面路径作为WAP下载页面发布,也放在j2medemo目录下,
       <?xml version="1.0"?>
       <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
           "http://www.wapforum.org/DTD/wml_1.1.xml">
     <wml>
       <card id="no1" title="Snake">
       <a href="http://127.0.0.1:8080/j2medemo/demo.jad">demo.jad</a>
       </card>
     </wml>


 e. 修改j2medemo目录下demo.jad文件中(txt打开编辑)demo.jar文件的路径,
         MIDlet-Jar-URL: http://127.0.0.1:8080/j2medemo/demo.jar;


  f.启动tomcat,启动WTK的OTAProvisioning,点击屏幕右下角的apps,点击installapplication,
       输入地址:http://127.0.0.1:8080/j2medemo/down.WML,选择demo.jad下载即可安装并运行;


g.用支持java手机,开通数据网络服务,输入部署地址访问即可ota下载;

你可能感兴趣的:(java,eclipse,tomcat,网络,web服务,j2me)