置顶随笔

     摘要: 针对j2me企业应用开发,自己设计的一套替换高级UI的实现的简单介绍。 这套UI的主要目的是提供Kjava更好的ui设计支持,简化开发和移植调试工作量。有别于一般的ui框架,尽可能考虑了对原来midp2.0 的兼容支持,方便平滑移植。  阅读全文
posted @ 2008-06-10 18:37 鬼狗 阅读(4323) | 评论 (32)编辑 收藏

2009年5月17日

用gwt开发,部署环境使用的是jndi, 而gwt 1.6自带的jetty缺省是不支持jndi设置的。

1.  copy  jetty-naming-6.1.11.jar jetty-plus-6.1.11.jar两个文件到 war/WEB-INF/lib目录下去。

这步一定注意,单纯把jar文件加到项目的classpath是无用的,其他类都可以从项目的classpath装载,这两个类不可以。
另外gwt 1.6自带的jetty是6.1.12以下版本的,所以只能用6.1.11.

2.  在web-inf下创建一个 jetty-web.xml . 我用的是oracle, 使用oracle自带的连接池就可以了。 如果用h2的话, 应该可以使用spring的singleConnectionDatasource, 稍后再试。

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
    <New id="REPORT" class="org.mortbay.jetty.plus.naming.Resource">
        <Arg>jdbc/reportdb</Arg>
        <Arg>
            <New class="oracle.jdbc.pool.OracleConnectionPoolDataSource">
                <Set name="URL">jdbc:oracle:thin:@localhost:1521:oralce10
                </Set>
                <Set name="User">reportdb</Set>
                <Set name="Password">reportdb</Set>
            </New>
        </Arg>
    </New>
</Configure>

第一个问题搞死人了:(
posted @ 2009-05-17 10:47 鬼狗 阅读(600) | 评论 (0)编辑 收藏

2009年4月26日

手机上网的时候, wml/XHTML 网页上往往有一些连接,点击即可调用手机实现拨号和发短信的功能,比较自然的体现了手机应用的特点。 dig了一下。

Wireless Telephony Application Interface (WTAI) 负责定义此项实现, 实际上,早期的j2me 实现类似功能,据说也是调用wap浏览器来间接做到的。

WTAI URI基本格式如下

wtai://<library>/<function> (; <parameter>)* [! <result>]
< > Denotes an enumerated operator
[ ] Denotes an optional section
|  Denotes a pair of mutually exclusive options
( )*  Repeat none or multiple items
*( )  Repeat one or multiple items
library  Name that identifies type of library, WTA Public uses library “wp”
function  Function within a library, for example “mc” for function “make call” in “wp” library
parameter Zero or more parameters sent to a function, should be delimited by a semicolon “;”
result  Start of result is denoted by “!”. optional

WTAI 代码示例

1. 实现click - to- dial 功能
mc: make call
<a href="wtai://wp/mc;5551212">Call 5551212</a>
另外在一些同时支持wml和xhtml mp的手机,比如nokia 系列, 也可以以非标准WTAI URI的方式调用,比如
<a href="tel:+468123456">Call</a>

2.  Add-to-Phonebook 
WMLScript: WTAPhoneBook.write("2", "5554367", "EINSTEIN");

3. Add-to-Speed Dial
<a href="wtai://wp/ap;5551212;My Company”>5551212</a>

4. voice call
wtai://vc/sc; 5554367;1

5. Accept Call
可以接收一个call 入电话,这个还不知道怎么玩,比较有意思。 如果能和后台语音系统整合


6. read text
可以读入一个网络文本,并且保存到手机。 超级短信?这个做广告的时候会比较实用。

WTAI是一个比较老的规范, 还不支持短信调用。
查了一下,在 xhtml mp中可以用如下格式 发送短信。

<a href="sms:+3581234567">Send SMS to us </a>


ps:实际测试发现, sms只有nokia支持, phonebook,除了nokia,很多手机都只支持加电话,会丢失联系人信息。




posted @ 2009-04-26 15:53 鬼狗 阅读(1489) | 评论 (1)编辑 收藏

2008年7月30日

     摘要:   阅读全文
posted @ 2008-07-30 19:37 鬼狗 阅读(2273) | 评论 (2)编辑 收藏

2008年7月29日

     摘要: 笑话,慎入  阅读全文
posted @ 2008-07-29 09:57 鬼狗 阅读(2029) | 评论 (7)编辑 收藏

2008年7月11日

     摘要:   阅读全文
posted @ 2008-07-11 19:52 鬼狗 阅读(1664) | 评论 (0)编辑 收藏
 
     摘要: 介绍对singleton的一种意外情况  阅读全文
posted @ 2008-07-11 18:29 鬼狗 阅读(1060) | 评论 (1)编辑 收藏
 
     摘要:   阅读全文
posted @ 2008-07-11 18:09 鬼狗 阅读(532) | 评论 (1)编辑 收藏
 
     摘要: 网站信息摘要  阅读全文
posted @ 2008-07-11 11:05 鬼狗 阅读(538) | 评论 (0)编辑 收藏

2008年7月10日

     摘要:   阅读全文
posted @ 2008-07-10 22:57 鬼狗 阅读(5713) | 评论 (3)编辑 收藏
 
     摘要:   阅读全文
posted @ 2008-07-10 19:51 鬼狗 阅读(1495) | 评论 (0)编辑 收藏
仅列出标题  下一页