eclipse-JEE配置Tomcat并发布第一个项目
KING-TING 人气:0
### 一、配置过程
>`Window——preferences——Server——Runtime Environment`,
然后点击`add`
![](https://imgkr.cn-bj.ufileos.com/0b22724a-ab47-41a0-8303-1c1a6c016e6c.png)
我下载的是`Tomcat7.0`,选择你的版本就行了
![](https://imgkr.cn-bj.ufileos.com/2e2e0542-23bc-4311-a554-0b8be794e164.png)
选择`Tomcat`的安装路径,`finish`
![](https://imgkr.cn-bj.ufileos.com/f72185bf-77a2-4e29-a6de-916397f07e92.png)
点击`Apply and close`
![](https://imgkr.cn-bj.ufileos.com/c1c7dda7-9777-4304-a9e3-ee7b1ba0e768.png)
### 二、检验是否配置成功
`File->New->Other->Web -> Dynamic Web Project `,创建web工程
![](https://imgkr.cn-bj.ufileos.com/4aafc227-61a0-439e-ad7f-eef5da0d503e.png)
![](https://imgkr.cn-bj.ufileos.comhttps://img.qb5200.com/download-x/d26aaad5-3110-485b-b545-91684111831a.png)
![](https://imgkr.cn-bj.ufileos.com/456fcc64-ba3f-46ff-9d0b-08c860a25ddf.png)
`WebContent`目录下创建一个html文件
![](https://imgkr.cn-bj.ufileos.com/c97dfb8d-50f0-4983-af0a-f350c8a986c1.png)
![](https://imgkr.cn-bj.ufileos.com/950518c6-5d11-4044-81bb-5c1042aac1f7.png)
右键项目->run as->run on server发布到服务器上去
![](https://imgkr.cn-bj.ufileos.com/c77cf5b6-0a2b-4346-b5d1-8316a49fe0e1.png)
`next`
![](https://imgkr.cn-bj.ufileos.com/2883b649-1455-4b19-aaf7-99ed86c599cb.png)
`add`
![](https://imgkr.cn-bj.ufileos.com/6a4af9e8-2e70-4176-afc1-1685718d6699.png)
输入路径,成功发布
![](https://imgkr.cn-bj.ufileos.com/31f124ee-89a0-4ab2-93d4-2f1caa734fa4.png)
加载全部内容