2008年7月11日

          用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 鬼狗 閱讀(621) | 評論 (0)編輯 收藏
           
          手機上網的時候, 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 鬼狗 閱讀(1513) | 評論 (1)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-30 19:37 鬼狗 閱讀(2294) | 評論 (2)編輯 收藏
           
               摘要: 笑話,慎入  閱讀全文
          posted @ 2008-07-29 09:57 鬼狗 閱讀(2057) | 評論 (7)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-11 19:52 鬼狗 閱讀(1689) | 評論 (0)編輯 收藏
           
               摘要: 介紹對singleton的一種意外情況  閱讀全文
          posted @ 2008-07-11 18:29 鬼狗 閱讀(1087) | 評論 (1)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-11 18:09 鬼狗 閱讀(552) | 評論 (1)編輯 收藏
           
               摘要: 網站信息摘要  閱讀全文
          posted @ 2008-07-11 11:05 鬼狗 閱讀(558) | 評論 (0)編輯 收藏
           
          主站蜘蛛池模板: 涡阳县| 宁国市| 清徐县| 四会市| 即墨市| 民权县| 顺义区| 湘潭县| 临夏市| 奈曼旗| 清河县| 双鸭山市| 黄浦区| 宿迁市| 富顺县| 四会市| 灵武市| 高阳县| 伊通| 承德市| 石景山区| 兰西县| 永宁县| 广西| 武胜县| 沭阳县| 新竹市| 永寿县| 太康县| 滦南县| 合山市| 大城县| 中山市| 伊宁县| 铜山县| 衡东县| 永年县| 嘉定区| 鸡东县| 东莞市| 潼南县|