eclipse如何配置tomcat(包含没有Server解决办法)

1. 如果你的eclipse中没有server选项,这篇文章或许可以帮助你。

没有server选项,无法配置tomcat
如上图所示,在开发WEB项目配置tomcat时,发现没有server服务选项时,点击help,选择install new software安装tomcat插件。
install new software
在work with中输入

kepler - http://download.eclipse.org/releases/kepler

等到搜索完成,勾选Web,XML, Java EE and OSGi Enterprise Development
点击next完成,等待漫长的安装即可
image.png
完成
image.png

2. 关于apache的安装请看这篇文章Apache Tomcat下载、安装图文教程
3. tomcat的配置

单击Window菜单,选择下方的Preferences
image.png
找到Server下的Runtime Environments
image.png
在Apache文件夹下选择安装的tomcat版本
image.png
选择tomcat安装路径,选择jre的版本–>Finish
image.png

如何让server显示在eclipse中,便于控制

image.png
在show view界面输入servers点击open
image.png
点击链接创建一个server
image.png
一般情况下这里默认就好,如果如要添加的WEB项目就点Next添加项目,暂时没有的话就点击Finish。
image.png
完成后如下图
image.png
这是后点击运行server

  • 如果报这样的一个错误
    The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports.
    image.png
    你需要双击你的tomcat server
    image.png
  • 如果出现这样的错误
    Several ports (8005, 8080) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
    image.png
    有可能是你的tomcat已经在运行中了,停掉正在运行的tomcat在这里运行就好了。
    启动成功
    image.png

到这里为止Tomcat在eclipse中配置已经基本完成,可以新建一个WEB项目,将项目添加到server中,开始在html中编写一句Hello World了。

  • 12
    点赞
  • 69
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值