---
title: "没事玩玩gwt2.0搭建（2）"
author: "无心徘徊"
date: "2011-07-08T10:13:10Z"
tags: []
categories: ["Web前端"]
slug: "gwt2-0-2"
draft: false
lastmod: "2011-07-08T10:13:10Z"
id: 1119365
url: "https://crazy-wind1.iteye.com/blog/1119365"
---

5 如果想在web中跑我们的工程我们可以这样做 5.1 用build.xml编译我们的工程 右键单击build.xml，run as执行该文件即可 5.2 将工程中war文件夹中的文件全拷贝到我们的tomcat下的webapp目录下 例如：把war文件夹中的文件全拷贝到以下目录 D:\\program files\\Apache Software Foundation\\Tomcat 5\\webapps\\twitter 5.3 然后双击D:\\program files\\Apache Software Foundation\\Tomcat 5\\bin目录下的startup.bat（在unix系统下请用startup.sh）这个文件即打开tomcat 5.4 在浏览器地址栏中输入http://localhost:8080/gwttest/testgwt.html 这个testgwt.html是默认生成的，大家看下拷贝的文件就知道了。 以上5.3 和 5.4 太麻烦 我们可以修改在tomcat目录下的D:\\program files\\Apache Software Foundation\\Tomcat 5\\conf中的文件server.xml，在最后面加入这样一句话即可。 下面中的地址我们可以想到是我们工程下的war目录 我们编译完之后，重启tomcat在浏览器地址栏中输入http://localhost:8080/test即可运行我们的工程 这里我配的的点乱，大家可以根据自己的喜好自己来尝试下。