2008年7月10日

          用gwt開發(fā),部署環(huán)境使用的是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下創(chuàng)建一個 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 鬼狗 閱讀(622) | 評論 (0)編輯 收藏
           
          手機上網的時候, wml/XHTML 網頁上往往有一些連接,點擊即可調用手機實現(xiàn)撥號和發(fā)短信的功能,比較自然的體現(xiàn)了手機應用的特點。 dig了一下。

          Wireless Telephony Application Interface (WTAI) 負責定義此項實現(xiàn), 實際上,早期的j2me 實現(xiàn)類似功能,據說也是調用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. 實現(xiàn)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 入電話,這個還不知道怎么玩,比較有意思。 如果能和后臺語音系統(tǒng)整合


          6. read text
          可以讀入一個網絡文本,并且保存到手機。 超級短信?這個做廣告的時候會比較實用。

          WTAI是一個比較老的規(guī)范, 還不支持短信調用。
          查了一下,在 xhtml mp中可以用如下格式 發(fā)送短信。

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


          ps:實際測試發(fā)現(xiàn), sms只有nokia支持, phonebook,除了nokia,很多手機都只支持加電話,會丟失聯(lián)系人信息。




          posted @ 2009-04-26 15:53 鬼狗 閱讀(1514) | 評論 (1)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-30 19:37 鬼狗 閱讀(2294) | 評論 (2)編輯 收藏
           
               摘要: 笑話,慎入  閱讀全文
          posted @ 2008-07-29 09:57 鬼狗 閱讀(2058) | 評論 (7)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-11 19:52 鬼狗 閱讀(1690) | 評論 (0)編輯 收藏
           
               摘要: 介紹對singleton的一種意外情況  閱讀全文
          posted @ 2008-07-11 18:29 鬼狗 閱讀(1088) | 評論 (1)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-11 18:09 鬼狗 閱讀(554) | 評論 (1)編輯 收藏
           
               摘要: 網站信息摘要  閱讀全文
          posted @ 2008-07-11 11:05 鬼狗 閱讀(558) | 評論 (0)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-10 22:57 鬼狗 閱讀(5740) | 評論 (3)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-10 19:51 鬼狗 閱讀(1515) | 評論 (0)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-10 19:22 鬼狗 閱讀(1355) | 評論 (0)編輯 收藏
           
               摘要: 記錄一下QT的designer  閱讀全文
          posted @ 2008-07-10 19:14 鬼狗 閱讀(2361) | 評論 (0)編輯 收藏
           
          主站蜘蛛池模板: 孝感市| 吉木乃县| 洛隆县| 鲁山县| 镇坪县| 白朗县| 四川省| 宜都市| 惠来县| 南华县| 全南县| 桂阳县| 沾益县| 玛曲县| 库伦旗| 绩溪县| 孝感市| 彭泽县| 余江县| 克山县| 海城市| 抚远县| 镇赉县| 无锡市| 正宁县| 社旗县| 农安县| 保亭| 泾源县| 望城县| 普格县| 高邮市| 洛隆县| 忻州市| 兴业县| 井陉县| 沭阳县| 永安市| 宾川县| 长阳| 宜春市|