Grails에는 구글 웹 툴킷(GWT; Google Web Toolkit)을 사용할 수 있는 GWT 플러그인이 있다.
2009/10/19 현재 버전은 0.4.1이다.

구글 코드(http://code.google.com/p/derjanandhisblog/wiki/GWTGrailsTutorial)에 튜토리얼이 있는데 답글까지 다 읽어봐야 동작하므로 수고를 덜기 위하여 기록을 남겨둔다.

  1. 설치방법
    • 다운로드 페이지에서 GWT를 먼저 다운받아 설치하고 경로를 연결한다.
    • grails install-plugin gwt
  2. 명령어 모음(굵은색은 기본 명령어)
    • grails clean-gwt-modules
    • grails compile-gwt-modules
    • grails compile-i18n
    • grails create-gwt-i18n
    • grails create-gwt-module
    • grails create-gwt-page
    • grails create-gwt-rpc
    • grails run-gwt-client
  3. 사용법
    • 모듈 생성
      • grails create-gwt-module com.gilbird.gwt.MyApp
    • 모듈 테스트 페이지 생성
      • grails create-gwt-page main/index.gsp com.gilbird.gwt.MyApp
    • 데이터 연동을 위한 stub 생성
      • grails create-gwt-rpc
    • 모듈 컴파일
      • grails complie-gwt-modules
    • 동작 시험
      • grails run-gwt-client
      • 다음 방법으로도 동작함
        • grails run-gwt-client [서버명]:[포트번호]
        • grails run-gwt-client [서버명]
        • grails run-gwt-client [포트번호]
      • 만약 잘 동작하지 않는다면
        • 환경변수 문제일 수도 있음
        • gwt-user.jar를 lib디렉토리에 복사
    • 웹 테스트
      • grails run-app
      • 웹 브라우저에서 해당페이지 접속하여 동작 확인