Recommanded Free YOUTUBE Lecture: <% selectedImage[1] %>

이 문서는 GWT와 Eclipse GWT Plugin을 설치했다고 가정하고 진행된다.

여기에서는 Eclipse의 구글 plugin을 이용해서 StockWatcher 프로젝트를 만들어보도록 한다. 또한 command 라인 유틸리티인 webAppCreator를 이용해서 개발하는 방법도 알아보도록 한다. StockWatcher 프로젝트는 GWT에 기본적으로 포함되어 있는 테스트 프로젝트다.

GWT Application의 생성

StockWatcher 애플리케이션 생성 - Eclipse 없이 -

  1. StockWatcher 애플리케이션의 생성
GWT는 WebAppCreator 라는 유틸리티를 제공한다. 이 툴을 이용해서 애플리케이션을 생성할 수 있다.
# ./webAppCreator -out StockWatcher com.google.gwt.sample.stockwatcher.StockWatcher
-out 옵션을 이용하면 지정된 디렉토리로 파일을 생성한다. 마지막 인자는 GWT 모듈이름이다.
  1. webAppCreator은 다음과 같은 서브 디렉토리와 파일들을 생성한다.
    Created directory StockWatcher/src
    Created directory StockWatcher/war
    Created directory StockWatcher/war/WEB-INF
    Created directory StockWatcher/war/WEB-INF/lib
    Created directory StockWatcher/src/com/google/gwt/sample/stockwatcher
    Created directory StockWatcher/src/com/google/gwt/sample/stockwatcher/client
    Created directory StockWatcher/src/com/google/gwt/sample/stockwatcher/server
    Created file StockWatcher/src/com/google/gwt/sample/stockwatcher/StockWatcher.gwt.xml
    Created file StockWatcher/war/StockWatcher.html
    Created file StockWatcher/war/StockWatcher.css
    Created file StockWatcher/war/WEB-INF/web.xml
    Created file StockWatcher/src/com/google/gwt/sample/stockwatcher/client/StockWatcher.java
    Created file StockWatcher/src/com/google/gwt/sample/stockwatcher/client/GreetingService.java
    Created file StockWatcher/src/com/google/gwt/sample/stockwatcher/client/GreetingServiceAsync.java
    Created file StockWatcher/src/com/google/gwt/sample/stockwatcher/server/GreetingServiceImpl.java
    Created file StockWatcher/build.xml
    Created file StockWatcher/README.txt
    Created file StockWatcher/.project
    Created file StockWatcher/.classpath
    Created file StockWatcher/StockWatcher.launch
    Created file StockWatcher/war/WEB-INF/lib/gwt-servlet.jar
  2. 이제 ant를 이용해서 host 모드로 프로젝트를 실행시킬 수 있다. 실행결과는 물론이고 디버깅 정보들까지 확인할 수 있다.
    # ant hosted
attachment:gwt_console.png