本期带来的教程内容是关于eclipse的,你们知道eclipse如何配置tomcat吗?以下教程文章就为大伙带来了eclipse配置tomcat的具体操作步骤介绍。
1.打开exclipse,菜单栏下的File(或在Project Explorer中右键)–New–Other…,打开后找到web–Dynamic Web Project,然后单击Next,
如下图:

2. 仅接上步,出现如下对话框,其中主要的几项内容如下(其中没有提及的就是用默认的,不要去修改,以图示配置为主):
Project name:项目名,
Target runtime:点击右侧“New Runtime”,选择自己用的服务器,这里我们选择:Apache – Apache Tomcat v7.0,选择后,单击”Next”,出现一项:Tomcat installation directory:,在该处找到你解压的Tomcat7的位置。然后单击”Finish”。
Configuration:点击右侧“Modify”,可以进行适当的配置,但根据我初学时候的经验,完全使用默认的就行了,不要去动里面的东西。等用到里面的配置时,你已经算是个老手了。



3. 上述配置完成后,出现如图所示,点击“Next”,
如下图:

4. 接上图,继续单击“Next”,
如下图:

5. 接上图,按图示进行选择,需要配置web.xml的话,打上“对钩”。单击”Finish”。
如下图:

6. 前面配置完成后,Project Explorer中,出现”Servers”和“helloworld”这两项,如下图

7. eclipse下方有个Servers标签(没有标签,在菜单window–Show View–other下选择Servers即可),右键new–Server,请直接看图中所示。


8. 上一步骤完成后,出现如图所示

9. tomcat在eclipse下的基本配置在此彻底完成。接下来就需要大家启动服务器,用代码进行测试了。

在eclipse中配置tomcat
在eclipse,菜单Window下选择Preferences,找到Server,选择Runtime Environments.
如下图:

选择Add,添加
如下图:

同第一种方式的第二步内容,不再多累述。
两个方式各自有各自的使用场合
1. 第一种方式,可以在新建项目时,顺手将tomcat配置好,方便,当然也可以先建立项目,之后再使用第二种方式配置tomcat。
2. 第二种方式,项目已经建立好了,我们只需要导入到我们的eclipse中来,并配置tomcat。
>>>>>>>>>>方法二<<<<<<<<<<
要想在Eclipse运行jsp文件,首先需要指定对应的服务器,即需要将Eclipse与Tomcat进行绑定,绑定成功后的界面如下:

①打开Eclipse,单击“window”菜单,选择下方的“Preferences”:

②找到Server下方的Runtime Environment,单击右方的Add按钮:

③选择已经成功安装的Tomcat版本,单击Next:

④设置Tomcat的安装目录:

⑤设置完成后,单击OK即可完成设置!

看了上文讲解的eclipse配置tomcat的具体操作步骤介绍,你们是不是都明白了呢?赶快去试试吧!