<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Java Me Games

    Java, Me, and Games.

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      13 Posts :: 0 Stories :: 3 Comments :: 0 Trackbacks
    摘要: 本文介紹用GWT(Google Web Toolkit)開發第一個Ajax應用。應用效果,將在應用頁面顯示一個按鈕,點擊時候顯示"HelloWorld"
    關鍵字: GWT Google Web Toolkit Ajax 入門應用

    環境準備

    • eclipse
    • google web toolkit
    • tomcat_5.0.28
    • 以上3者均可通過google搜索方便下載到,安裝配置不再詳細介紹

    實現過程

    1、創建應用
    創建一個gwt項目的目錄,我的就是在d:\gwt_test\helloworld
    用gwt的applicationCreator.bat(該批處理文件在gwt安裝目錄下可以看到)創建應用:
    applicationCreator.cmd org.jmg.client.HelloWorld
    成功執行輸出:
    Created directory D:\gwttest\helloworld\src(這個目錄包含自動創建的java文件)
    Created directory D:\gwttest\helloworld\src\org\jmg
    Created directory D:\gwttest\helloworld\src\org\jmg\client
    Created directory D:\gwttest\helloworld\src\org\jmg\public
    Created file D:\gwttest\helloworld\src\org\jmg\HelloWorld.gwt.xml
    Created file D:\gwttest\helloworld\src\org\jmg\public\HelloWorld.html
    Created file D:\gwttest\helloworld\src\org\jmg\client\HelloWorld.java
    Created file D:\gwttest\helloworld\HelloWorld-shell.cmd(這個命令將會調用gwt內置的服務器來運行應用)
    Created file D:\gwttest\helloworld\HelloWorld-compile.cmd(編譯應用,把前邊的java文件編譯成javascript代碼,和其他的附加文件,注意,他不會編譯server端文件)

    2、編譯輸出:
    執行helloworld下的HelloWorld-compile.cmd
    Output will be written into D:\gwttest\helloworld\www\org.jmg.HelloWorld(默認的,gwt會把客戶端代碼文件放到一個名字為完整的應用名稱的目錄)
    Copying all files found on public path
    Compilation succeeded
    編譯成功。

    3、準備tomcat:
    在tomcat安裝目錄下webapps目錄創建一個gwt文件夾
    相應的創建其他的web應用的文件和文件夾:
    gwt\WEB-INF
    gwt\WEB-INF\classes
    gwt\WEB-INF\lib
    gwt\WEB-INF\web.xml
    web.xml內容如下: <?xml version="1.0" encoding="UTF-8"?> <web-app> </web-app>

    4、部署到tomcat:
    在gwt目錄創建helloword目錄
    復制剛才執行HelloWorld-compile.cmd生成的文件(在www\org.jmg.HelloWorld目錄)到helloworld目錄下,注意,只要這個文件夾中的文件,不要文件夾。

    5、運行看效果:
    啟動tomcat
    訪問http://localhost:8080/gwt/helloworld/HelloWorld.html
    頁面上將會顯示
    一個標題,一段說明文字,和一個Click Me按鈕
    點擊按鈕將會顯示 "HelloWorld"文字

    參考: GWT Google Web Toolkit Hello World Example Project
    更多文章:


    posted on 2007-01-06 03:30 Nile Black 閱讀(404) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 亚洲国产精品网站在线播放| 一级做α爱过程免费视频| 免费精品一区二区三区在线观看 | 亚洲精品成a人在线观看夫| 国产精品久久免费视频| 中文毛片无遮挡高清免费| 亚洲国产精品自在线一区二区| 免费a级毛片高清视频不卡| 国产成人综合亚洲| 亚洲av无码专区在线播放| 欧美a级成人网站免费| 一区二区视频免费观看| 亚洲码一区二区三区| 亚洲福利在线播放| 久久大香香蕉国产免费网站| 亚洲AV成人无码网天堂| 亚洲成年轻人电影网站www | 亚洲综合色婷婷七月丁香| 毛片免费全部播放无码| 一级毛片人与动免费观看| 亚洲激情黄色小说| 中文字幕中韩乱码亚洲大片| 成视频年人黄网站免费视频| 国产综合免费精品久久久| 亚洲成a人片在线观看天堂无码| 香蕉视频在线观看亚洲| 亚洲国产成人久久综合区| 中字幕视频在线永久在线观看免费 | 精品久久久久久国产免费了| 亚洲精品第一综合99久久| 亚洲AV无码精品色午夜在线观看| 国产精品自在自线免费观看| 国产成人精品免费视频大| 中文字幕av无码不卡免费| 美女18一级毛片免费看| 亚洲一卡2卡4卡5卡6卡残暴在线| 国产AV无码专区亚洲Av| 亚洲欧洲一区二区三区| 全免费a级毛片免费看不卡| 91人成网站色www免费下载| 抽搐一进一出gif免费视频|