用gwt開發(fā),部署環(huán)境使用的是jndi, 而gwt 1.6自帶的jetty缺省是不支持jndi設(shè)置的。

          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的話, 應(yīng)該可以使用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 鬼狗 閱讀(624) | 評論 (0)編輯 收藏
           
          手機上網(wǎng)的時候, wml/XHTML 網(wǎng)頁上往往有一些連接,點擊即可調(diào)用手機實現(xiàn)撥號和發(fā)短信的功能,比較自然的體現(xiàn)了手機應(yīng)用的特點。 dig了一下。

          Wireless Telephony Application Interface (WTAI) 負責定義此項實現(xiàn), 實際上,早期的j2me 實現(xiàn)類似功能,據(jù)說也是調(diào)用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的方式調(diào)用,比如
          <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
          可以讀入一個網(wǎng)絡(luò)文本,并且保存到手機。 超級短信?這個做廣告的時候會比較實用。

          WTAI是一個比較老的規(guī)范, 還不支持短信調(diào)用。
          查了一下,在 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 鬼狗 閱讀(1515) | 評論 (1)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-30 19:37 鬼狗 閱讀(2295) | 評論 (2)編輯 收藏
           
               摘要: 笑話,慎入  閱讀全文
          posted @ 2008-07-29 09:57 鬼狗 閱讀(2060) | 評論 (7)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-11 19:52 鬼狗 閱讀(1692) | 評論 (0)編輯 收藏
           
               摘要: 介紹對singleton的一種意外情況  閱讀全文
          posted @ 2008-07-11 18:29 鬼狗 閱讀(1090) | 評論 (1)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-11 18:09 鬼狗 閱讀(555) | 評論 (1)編輯 收藏
           
               摘要: 網(wǎng)站信息摘要  閱讀全文
          posted @ 2008-07-11 11:05 鬼狗 閱讀(560) | 評論 (0)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-10 22:57 鬼狗 閱讀(5742) | 評論 (3)編輯 收藏
           
               摘要:   閱讀全文
          posted @ 2008-07-10 19:51 鬼狗 閱讀(1517) | 評論 (0)編輯 收藏
          僅列出標題
          共5頁: 1 2 3 4 5 下一頁 
           
          主站蜘蛛池模板: 商河县| 巴楚县| 南和县| 张家口市| 二手房| 元阳县| 特克斯县| 毕节市| 八宿县| 迁安市| 洞口县| 广安市| 剑河县| 兴宁市| 德兴市| 浮梁县| 嫩江县| 阿鲁科尔沁旗| 马龙县| 开江县| 夏邑县| 扎赉特旗| 哈巴河县| 民勤县| 马龙县| 吴江市| 阳高县| 连山| 胶南市| 察雅县| 尚义县| 汝南县| 贵州省| 连南| 遂昌县| 滕州市| 渝中区| 青河县| 巴林左旗| 全椒县| 绥化市|